A What is the output of the following C code fragment all va

A. What is the output of the following C++ code fragment? (all variables are of type int) int count-1; int y-100; while (count 3) y=y-1 ; count+t cout

Solution

Question A;

Answer:

y = 97

count = 7

Question B:

Answer: 20

x value is 20 because initial value x vallue is 0 and that x value is incremented by 1 inside while loop up to 20.

Question c:

Answer: length = 686 and count = 8

 A. What is the output of the following C++ code fragment? (all variables are of type int) int count-1; int y-100; while (count 3) y=y-1 ; count+t cout Solution

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site