Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

10:23 PM 23% ooo Verizon D bblearn missouri.edu CS1050-C Programming Quiz SPRING

ID: 3831969 • Letter: 1

Question


10:23 PM 23% ooo Verizon D bblearn missouri.edu CS1050-C Programming Quiz SPRING 2017 DONOT PUT YOUR ANSWERS ON THIS SHEET-RECORD THEM ON THE ANSWER SHEET ONLY 1. After this line of code executes what will be the value of "result" nt result 0 5; 2. After this line of code executes what will be the value of "result"? int result -20 5 2 3/10 6 12 /4; 3. What will be the value of sumtotal" when this code is executed? int n if (nl 4) sumtotal n3; else if (n3 5) sumtotal ++n2; else sumtotal nl 4. What is the final value of "y" after this for loop is finished? for 5. What will the following C code print out? int x 7, y 5; if (x 5) if (y 5) print x and y are 5"); else print x is 5'); a) x and y are >5" b) "x is 5" c nothing will be printed 6. In which of the following is "y" not equal to 5 after execution? X is equal to 4. b) y x 5 c) 5 a) y ++x; Examine the following code and answer questions 7 below. IGNORE COMPILE ERRORS. int j 0; for 0: j j++) print "%d", 1 (rand0% 5 7. What are the POSSIBLE range of numbers that will be printed by the "printfo" statement above? 8. Examine the following code. What will be the output from the "printfo" statement below?

Explanation / Answer

Ans :

1. Program :

#include <iostream>
using namespace std;

int main() {
   // your code goes here
   int result = 10 % 5;
   cout << result <<endl;
   return 0;
}


1. Ouput : 0

2. Output : 20

3. Output : 2

4. Output : 18

5. Otion b " x is <= 5"

6.otion d : y=x++

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote