Vidyalelo
C Programming · Q59

File Input Output

Programming · C Programming · question 59

Q59

What will be the output of the following C code? #include int main() char str[11] = "hello"; char *str1 = "world"; strcat(str, str1); printf("%s %d", str, str[10]);

A.
helloworld 0
Answer
B.
helloworld anyvalue
C.
worldhello 0
D.
Segmentation fault/code crash

Answer: Option A

Solution

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