Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

=+2. Why is due process important?

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago