Question
What is the value of z and w after executing this code snippet? int x = 10; int y= 5; int z = ( (x+y)%5
What is the value of z and w after executing this code snippet?
int x = 10;
int y= 5;
int z = ( (x+y)%5 == 0 ? 35.5:45.5);
double w = ( (x+y)%5 == 0 ? 35.5:45.5);
a. 35 and 35
b. 35 and 35.5
c. 35.5 and 35.5
d. 35.5 and 35
Find the output of the following code snippet?
int i,j,k;
for(i=0; i<2; i++) {
for(j=0; j<2; j++) {
for(k=0; k<2; k++) {
cout< } cout< } } a. 000010 100110 001011 101111 b. 00001 10011 00101 10111 c. 000101 001101 010111 011111 d. 000101 101100 000110 101111 the answer is BA please explain the reason thanks so much!!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started