Vidyalelo
C Programming · Q209

Pointer

Programming · C Programming · question 209

Q209

What will be the output of the following C code? #include int x = 0; void main() int *const ptr = &x; printf("%p ", ptr); ptr++; printf("%p ", ptr);

A.
0 1
B.
Compile time error
Answer
C.
0xbfd605e8 0xbfd605ec
D.
0xbfd605e8 0xbfd605e8

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board