Vidyalelo
C Programming · Q101

Pointer

Programming · C Programming · question 101

Q101

What will be the output of the following C code? #include int main() char *str = "hello, world "; str[5] = '.'; printf("%s ", str); return 0;

A.
hello. world
B.
hello, world
C.
Compile error
D.
Segmentation fault
Answer

Answer: Option D

Solution

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