Question
Final Quiz of Programming Fundamentals(C) 14. i += j;Give the values of i and j after each of the above expression statements has been executed.
Final Quiz of Programming Fundamentals(C)
14. i += j;Give the values of i and j after each of the above expression statements has been executed. (Assume that i has the value 1 initially and j has the value 2.) Single-choice
a. i = 1, j = 3;
b. i = 2, j = 1;
c. i = 3, j = 2;
ans:
15. Which one of the following statements is not equivalent to the other two (assuming that the loop bodies are the same)?Single-choice
a. for (i = 0; i < 10; i++) ...
b. for (i = 0; i < 10; ++i) ...
c. for (i = 0; i++ < 10; ) ...
ans:
16. Which one of the following statements is not equivalent to the other two (assuming that the loop bodies are the same)?Single-choice
a. while (i < 10) {...}
b. for (; i < 10;) {...}
c. do {...} while (i < 10);
ans:
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