Assume that str1 and str2 are variables of type C-string. The proper expression to use when comparing them for equality is
A) str1 = str2.
B) str1 == str2.
C) strcmp(str1, str2) == 0.
D) str1.compare(str2) .
E) None of the above
Correct Answer:
Verified
Q4: A library function that looks for the
Q5: The string class overloads the += operator
Q6: The expression strcmp("ab", "cde") returns
A) the boolean
Q7: The _ function accepts a C-string as
Q8: The string class append member function str.append(s)tacks
Q10: When using the strcat function, you must
Q11: An array of characters ending with the
Q12: A good way to convert a value
Q13: Which statements convert the string "10" to
Q14: The C++ compiler performs strict array bounds
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents