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

20 POINT QUESTION!! identify five companies with national or international markets in the hybrid cloud arena.
A convex mirror of focal length 34 cm forms an image of a soda bottle at a distance of 18 cm behind the mirror. The height of the image is 6.8 cm. a) Where is t
Write an equation that models the sequence -2, -6, -18, -54, ... A) y = -2x B) y = -2x2 C) y = -3x D) y = -2*3x - 1
define the words please
22,602,188,507 what is the value of the digit 6 in the number
The Cold War was primarily a conflict between the United States and what other country?
can you submit pictures​
3.3) A die is rolled 600 times with the following results: It landed on one-102 times, two-97times, three-100 times, four-105 times, five-92 times. How many tim
Could someone please help me with this ASAP thank you
What is the answer to this?