...
Question 9824 – Programming
February 13, 2024
Question 9873 – Programming
February 13, 2024
Question 9824 – Programming
February 13, 2024
Question 9873 – Programming
February 13, 2024

Question 9851 – Programming

The value of j at the end of the execution of the following C program.

int incr(int i)
{
   static int count = 0;
   count = count + i;
   return (count);
}
main()
{
   int i,j;
   for (i = 0; i <= 4; i++)
      j = incr(i);
} 

is

Correct Answer: A

Question 27 Explanation: 
At i=0; count=0
i=1; count=1
i=2; count=3
i=3; count=6
i=4; count=10
It return count value is 10.
A
10
B
4
C
6
D
7
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!