Vidyalelo
C Programming · Q37

C Miscellaneous

Programming · C Programming · question 37

Q37

Determine Output: void main() int i=i++, j=j++, k=k++; printf("%d %d %d", i, j, k);

A.
1 1 1
B.
0 0 0
C.
garbage values
Answer
D.
Error

Answer: Option C

Solution

Answer: Option C
Solution:

An identifier is available to use in program code from the point of its declaration. So expressions such as i = i++ are valid statements. The i, j and k are automatic variables and so they contain some garbage value.