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

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

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

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

#include

int fun(int i) {

return i++;

}

int main (void) {

int i = 1;

i = fun(i);

printf("%d",i);

return 0;

}

Choose the correct answer:


A.

The program outputs 2


B.

Compilation fails


C.

The program outputs 0


D.

The program outputs 1


E.

The program outputs an unpredictable value


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.