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

Which statement is true about limericks? A. Limericks always contain "season" words. B. Limericks always contain rhyming couplets. C. Limericks always end with
Can someone please tell me if I did this right
Describe Jewish beliefs about the Messiah.
An elephant weighs 5000 kg. It eats 150 kg each day. What percent of its own weight does an elephant eat each day?
change 12.39% to decimal
Are alkaline earth elements metals or metalloids??
Scientists often work together, but in certain situations, scientists compete with each other. What could be an advantage of competition in science? A. Competit
Equal volumes of H2 and o2 are placed in a balloon and then ignited. Assuming that the reaction goes to completion, which gas will remain in excess 2 O 2H both
When you climb a rope , you change what energy into what energy
A study showed that the mortality risk for human babies goes up as birth weight decreases below the average. Another study shows an increase in mortality risk a