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

What is the answer to 1.43 x -19/37
who conquered Quebec
3.06 rounded to the nearest tenth
according to the ninth amendment, who retains certain rights not mentioned in the constitution?
The height of Gateway Arch shown on Missouri quarter is 630 feet or 7,560 inches.Find how many 4-inch stacks of quarters make up the height of Gateway Arch.If t
Marcia uses 5 ounces of chicken stock to make one batch of soup. She has a total of 400 ounces of chicken stock. How many batches of soup can Marcia make
A paragraph on Sam Houston's death. (4-5 sentences. When, how, why)
You are going to mix a gallon bucket of window cleaner. The instructions direct you to mix 1 part cleaner to 3 parts water. How much cleaning solution will you
Fernando paid 2.80 for potatoes .Potatoes cost 0.25 per pound . How many pounds of potatoes did Fernando buy?
Accented notes that run against the regular pulse of the musical meter are referred to as