adplus-dvertising
frame-decoration

Question

What is the output of this program?
#include <stdio.h>
#include<string.h>
void main()
{
    char s1[20] = "Hello", s2[10] = " World";
    printf("%s", strcpy(s2, strcat(s1, s2)));
}

a.

Hello World

b.

HelloWorld

c.

Hello

d.

World

Posted under Strings C Programming

Answer: (a).Hello World

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?