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

100 points! The picture has the question
Which statements are true about the graph? Select all that apply. The range is {yly ≤ 6} The domain is {z-5≤x≤ 10} The graph is increasing when x 24 The graph
Write a journal for a week in the life of a General in the service of Rome in Gaul, Britannia, or Carthage. Someone please help me answer this! I'll be your new
Provide three sets A, B and C which satisfy the cardinality condition |A| = |B| = |C| = 4​
A teacher asks a student to write the chemical equation for photosynthesis. The student's response is shown below. CO2+H2O→C6H12O6+O2 The equation is not balanc
Write 3 sentences about a utopia that will be a progressed version of earth.
Consider the following sets in the universal set U, which is the set of all elements of the three given sets below. List the elements of the sets being describe
Each graph shows a relation. The first and second numbers of each ordered pair in the relation are members of the set of real numbers, In each case find the ran
I have attached the question with a photo
While taking a standardized test with randomly scrambled answers, you notice that your last four answers have been "c." Which of the following is true concernin