Q: What is the output of the below c code?
Options:
a) Different address is printed
b) Same address is printed
c) Run time error
d) Nothing
Answer: B
| #include <stdio.h> |
| void main() |
| { |
| char *s = "hello" ; |
| char *p = s; |
| printf ( "%p\t%p" , p, s); |
| } |
Options:
a) Different address is printed
b) Same address is printed
c) Run time error
d) Nothing
Answer: B
No comments:
Post a Comment