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[] = \ What will be the output of the program? #include #include main() {char str1[] = \](/WebImages/21/what-will-be-the-output-of-the-program-include-include-main-1046691-1761544531-0.webp)