C - Data Types - Discussion

You Are Here :: Home > C > Data Types - Discussion

 



Q.

Consider the following program fragment:

int b = 1;
int fiddle(int c)
{
c *= 2; b = 0;
return 3;
}
main()
{ int a = 5, b = 7, c = 2;
c = fiddle(a);
/* HERE */
}
What are the values of a, b and c when execution reaches /* HERE */?

A. a is 5, b is 1, c is 4 B. a is 10, b is 7, c is 2
C. a is 10, b is 1, c is 3 D. a is 5, b is 7, c is 3

Answer: Option D
Explaination:

 


No Explanation








Discussion

Your Comments Goes here...
NameDiscussion