Valid CLA-11-03 Dumps shared by ExamDiscuss.com for Helping Passing CLA-11-03 Exam! ExamDiscuss.com now offer the newest CLA-11-03 exam dumps, the ExamDiscuss.com CLA-11-03 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com CLA-11-03 dumps with Test Engine here:
What happens when you compile and run the following program? #include <stdio.h> int fun(void) { static int i = 1; i++; return i; } int main (void) { int k, l; k = fun (); l = fun () ; printf("%d",l + k); return 0; } Choose the right answer:
Correct Answer: A
The program defines a function fun with a static variable i. The main function declares two variables k and 1 (Note: The second variable has an invalid name, it should be changed to a valid identifier). The fun function is called twice, and each time it increments the static variable i by 1. The values assigned to k and 1 become 2 and 3, respectively. The printf statement then prints the result of 1 + k, which is 3 + 2 equal to 5. Therefore, the correct answer is "The program outputs 5."