Sail E0 Webinar
Question

What is the output of this program?

#include < iostream >

using namespace std;

int main()

{

int i, j;

j = 10;

i = (j++, j + 100, 999 + j);

cout

Options:
A .  1000
B .  11
C .  1010
D .  1001
Answer: Option C


j starts with the value 10. j is then incremented to 11. Next, j is added to 100. Finally, j (still containing 11) is added to 999 which yields the result 1010.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers