Vidyalelo
C Programming · Q32

C Miscellaneous

Programming · C Programming · question 32

Q32

Determine Output: #include void main() register i=5; char j[]= "hello"; printf("%s %d", j, i);

A.
hello 5
Answer
B.
hello garbage value
C.
Error
D.
None of These

Answer: Option A

Solution

Answer: Option A
Solution:

If you declare i as register compiler will treat it as ordinary integer and it will take integer value. i value may be stored either in register or in memory.