Vidyalelo
C Programming · Q154

Pointer

Programming · C Programming · question 154

Q154

What will be the output of the following C code? #include void main() char *s = "hello"; char *n = "cjn"; char *p = s + n; printf("%c %c", *p, s[1]);

A.
h e
B.
Compile time error
Answer
C.
c o
D.
h n

Answer: Option B

Solution

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