C Programming String Multiple choice question

Exercise :: String - General Questions

This section contains a lot of Question with answer and explanation.

4) What would be the output of the following C programs ?
                                                  

#include<stdio.h> #include<string.h> void main() { char str1[20] = "Hello", str2[20] = " World"; printf("%s\n", strcpy(str2, strcat(str1, str2))); }

A. Hello
B. Hello World
C. Run Time Error
D. Compilation Error

Answer:

Hello World

Option:

( B )


Explanation :

No explanations available for this question.