saslop24 saslop24
  • 22-03-2021
  • Computers and Technology
contestada

Given that, x = 2, y = 1, and z = 0, what will the following cout statement display?

cout << "answer = " << (x || !y && z) << endl;

Respuesta :

qgtdtq
qgtdtq qgtdtq
  • 22-03-2021

Answer:

This will return 1

Code:

#include <iostream>

using namespace std;

int x = 2;

int y = 1;

int z = 0;

int main() {

   cout << (x || !y && z) << endl;

   return 0;

}

Answer Link

Otras preguntas

why did andrew jackson want the indians to leave their tribes
A 50-kg child on a skateboard experiences a 75-N force. What is the expected acceleration of the child?
Could the last carbon atom chain make bonds with four hydrogen atoms?why or why not?
Review important identitie cosx cosy = 1/2 [cos(x+y) + cos(x−y)]
In 1904, the Supreme Court ruled that which of the following was a “combination in restraint of trade”? (A) Sherman Antitrust Act (B) AFL (C) Grange Movement (D
Ok so I have like a grid and it says "On the grid to the right, draw a polygon that has 2 pairs of parallel sides, 2 pairs of sides equal in length, and 2 acute
why did andrew jackson want the indians to leave their tribes
What's the answer to log1/3 27 = ?
how do you write 3.04 as a mixed number?
How did socialist labor movements affect strife at start of 20th century