What will be the output of the following code snippet? char str [] = {'h',…
What will be the output of the following code snippet?
char str [] = {'h', 'e', 'l', 'l', 'o', '\0'};
str[0] = 'y';
printf("%s", str);
- A.
hello
- B.
yello
- C.
ello
- D.
hyello
Attempted by 7 students.
Sign up free to check your answer
Sign up freeLoading lesson…