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

the radius of a clock is 8 3/4 in what is its area to the nearest whole number
To turn a decimal into a percent you move the decimal 2 spaces to which direction.
Make a prediction why Elie is going to lose his faith (stop believing in God and Jewish religion). What do you think he will say about why he stops believing?
Find the measures of the interior angles?
What is the probability of an event that is impossible?
What does foreign policy effect internationally?
_____ is a significant question because, once the decision has been made and implemented, the firm must live with it due to the high costs involved
how does the number if possible outcomes of a single event help you determine the total number of possible outcomes of a compound event?
Use a spelling word to complete the sentence. The Bible is the best _______ . disease illness guidance direction guidebook plan or directions for an area of tra
Tell what is person is like, has (hair/eyes), and is wearing