What will be the output of the program include include main

What will be the output of the program? #include #include main() {char str1[] = \"Hello\"; char str2[] = \"guy\"; strcpy(str1, str2); cout

Solution

Answer:

The output of the program is Option C i.e guy

Program:

#include<iostream.h>
#include<string.h>
int main()
{
char str1[]=\"Hello\";
char str2[]=\"guy\";
strcpy(str1,str2);
cout<<str2;

}

Output :

guy

 What will be the output of the program? #include #include main() {char str1[] = \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site