What will be the output of the following C code?
#include <stdio.h>
void main()
{
char *s = "hello";
char *p = s;
printf("%p\t%p", p, s);
}
#include <stdio.h>
void main()
{
char *s = "hello";
char *p = s;
printf("%p\t%p", p, s);
}
A. Different address is printed
B. Same address is printed
C. Run time error
D. Nothing
Answer: Option B
Join The Discussion