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 of these began with the rivalry between Whigs and Democrats? A) The two-party system B) The Era of Good Feelings C) The constitutional debates D) The Pan
solve the system by substitution.
what inference can you make about the man from the evidence in this passage from to build a fire
The goal of a toy drive is to donate more than 1000 toys. The toy drive already has collected 300 toys. How many more toys does the toy drive need to meet its g
what does this equal 3+x−2=10?
What is a relationship between a object and a class?
The American judiciary is subjected to a number of checks. One such check is that: a. the Supreme Court hears meritless appeals so it can rule on such issues.
A program needs to simulate 15 trials. During each trial, a game spinner with four possible options is spun 50 times. Which loop structure best represents the c
the Paleolithic age is A) also called the new stone age B) known as a time of intensive farming C) usually known as the primitive age D) the period in which h
How do you graph a y-intercept equation? How do you find it in a graph/model/word problem?