Assume that str1 and str2 are variables of type C- string. The proper expression to use when comparing them for equality is
A) str1.compare(str2) .
B) str1 = str2.
C) str1 == str2.
D) strcmp(str1, str2) == 0.
E) None of the above
Correct Answer:
Verified
Q13: By being able to pass arrays as
Q14: The C++ compiler performs strict array bounds
Q16: To access the last character of a
Q17: A good way to convert a value
Q18: An array of characters ending with the
Q19: The strcpy function's arguments are
A)two pointers to
Q20: The function accepts a C- string as
Q23: The itoa function is similar to atoi,
Q24: A library function that looks for the
Q26: To use the strlen function in a
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