Vidyalelo
C++ Programming · Q152

Classes and Objects in C++

Programming · C++ Programming · question 152

Q152

What will be the output of the following C++ code? #include #include using namespace std; int main () char str1[10] = "Hello"; char str2[10] = "World"; char str3[10]; int len ; strcpy( str3, str1); strcat( str1, str2); len = strlen(str1); cout << len << endl; return 0;

A.
5
B.
55
C.
11
D.
10
Answer

Answer: Option D

Solution

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