-
What is the output of this program?
#include <iostream>
#include <cstring>
using namespace std;
int main ()
{
char s1[10] = "Interview";
char s2[10] = "Mania";
char s3[10];
int length ;
strcpy( s3, s1);
strcat( s1, s2);
length = strlen(s1);
cout << length << endl;
return 0;
}
-
- Interview
- Mania
- Interview Mania
- 14
- None of these
Correct Option: D
In the program, We are concatenating the s1 and s2 and printing it’s total length. So the length is 14.