Vidyalelo
C Programming · Q177

Pointer

Programming · C Programming · question 177

Q177

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

A.
hello, world!!
B.
Compile time error
C.
Undefined behaviour
Answer
D.
Segmenation fault

Answer: Option C

Solution

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