Given the declaration:
char str1[15];
char str2[15] = "Good day";
Mark the following statements as valid or invalid. If a statement is invalid, explain why.
a. str1 = str2;
b. if (str1 == str2)
cout << " Both strings are of the same length." << endl;
c. if (strlen(str1) >= strlen(str2))
str1 = str2;
d. if (strcmp(str1, str2) < 0)
cout << "str1 is less that str2." << endl;
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.