C++ Institute CLA - C Certified Associate Programmer CLA-11-03 Question # 12 Topic 2 Discussion

C++ Institute CLA - C Certified Associate Programmer CLA-11-03 Question # 12 Topic 2 Discussion

CLA-11-03 Exam Topic 2 Question 12 Discussion:
Question #: 12
Topic #: 2

What happens if you try to compile and run this program?

#include

int main (int argc, char *argv[]) {

int i =2, j = 1;

if(i / j)

j += j;

else

i += i;

printf("%d",i + j);

return 0;

}

Choose the right answer:


A.

The program outputs 1


B.

The program outputs 5


C.

The program outputs 3


D.

Compilation fails


E.

The program outputs 4


Get Premium CLA-11-03 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.