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 number, 6.022 x 1023 is known as a ___.
use the Babylonian method for your next estimate for square root 130 by using 11.4022 as your guess. what is your result
What are oils and fats made from?
Drew's weekly allowance is $8.00.His friend Jan's weekly allowance is $10.Drew spends $3 a week and Jan spends $4 a week. Write two expressions to show how much
Shonda made a model of a solid ice cream cone with a spherical scoop of ice cream on top, made out of clay. Which formulas are needed to calculate how much clay
Which events of 1943 helped make an Allied victory possible? Choose all answers that are correct. A. The atomic bomb was developed, tested, and used. B. U.S. in
Why did Italians feel strongly about their nationalist ideas
what does suffrage mean?
Popcorn is composed mainly of starch. T or F
Magnets are often fitted to the doors of refrigerators and cupboards WHY?