Programing Chapter 10 Quiz Characters, Strings, and string Class
You may use the relational operators <, >, <=, >=, ==, and != to compare two string objects.
True
The functions that receives a single char, named ch, and returns true if that char is a letter are (select two)
isalpha(ch), isalnum(ch)
The function that receives a single char, named ch, and returns true if that char is a digit is (select two)
isdigit(ch), isalnum(ch)
The function that receives a single char, named ch, and returns true if that char is a punctuation symbol is
ispunct(ch)
The function that receives a single char, named ch, and returns true if that char is an upper case letter is
isupper(ch)
When this operator is used with string operands it concatenates them, or joins them together.
+
The isdigit() function will return true if its argument is an int between 0 and 9.
False
What ASCII and Unicode character has integer value 0?
NUL
In C++ (and most other languages), a string is implemented as an array of characters, terminated by a:
NUL character
To use the character functions, include the header file
cctype
To use the character testing functions isupper and islower, include the header file
cctype
Which of the following are "space" characters?
space, tab
The library used to implement strings in C++ is
string
To use strings in C++, include the header file
string
How would you concatenate two strings, name string1 and string2, and store the result in string3?
string string3 = string1 + string2;
To change a character argument, named ch, from lower case to upper case, use this function.
toupper(ch)
To change a lower case character, named ch, to an upper case character, use this function.
toupper(ch)