Language c++: 1. Given string str is "Great", which choice has all matching expressions? Group of answer choices a. str == "Great" b. str == "Great", str == "great" c. str == "Great", str == "Great!" d. str == "Great", str == "great", str == "Great!" 2. What is the ending value of userString? (Note the question asks about userString, not about x). userString = "FaceBook"; x = tolower(userString.at(4)); a. "Facebook" b. "FaceBook" c. "Faceook" d. "b" 3. Which expression evaluates to true if the corresponding characters of strings s1 and s2 are equal independent of case? Ex: "C" and "c" should be considered equal. Group of answer choices a. str1.at(i) == str2.at(i) b. str1.at((tolower(i)) == str2.at(tolower(i)) c. str1.at(i) == toupper(str2.at(i)) d. toupper(str1.at(i)) == toupper(str2.at(i)) 4. Given string str1 and string str2, which expression is true? str1 = "Hi"; str2 = "Hello"; Group of answer choices a. str1 < str2 b. str1 > str2 c. str1 <= str2 d. (Comparison not possible)
Language c++:
1. Given string str is "Great", which choice has all matching expressions?
What is the ending value of userString? (Note the question asks about userString, not about x).
userString = "FaceBook";x = tolower(userString.at(4));
3. Which expression evaluates to true if the corresponding characters of strings s1 and s2 are equal independent of case? Ex: "C" and "c" should be considered equal.
4. Given string str1 and string str2, which expression is true?
str1 = "Hi";str2 = "Hello";
cout << firstStr << " " << secondStr << endl;
}
else {
cout << secondStr << " " << firstStr << endl;
}
6. For the string "on time", what character is at index 3?
7. Given str = "Cat", what is the result of this statement?
str.at(1) = "ab";8. What is the relation between a string's length and the string's last index?
9. Given string s is "Sunday", what is the ending value of char myChar?
myChar = s.at(s.size() - 1);10. Given userStr = "Doghouse", what is the ending value of char x?
x = tolower(userStr.at(2));Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 4 images