Vidyalelo
C Programming · Q168

Pointer

Programming · C Programming · question 168

Q168

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

A.
Same address
Answer
B.
Different address
C.
Compile time error
D.
Varies

Answer: Option A

Solution

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