Ch. 10 Characters, C-strings and More About the string Class Flashcards
The _______ function returns true if the character argument is uppercase.
isupper
The _______ function returns true if the character argument is a letter of the alphabet.
isalpha
The _______ function returns true if the character argument is a digit.
isdigit
The _______ function returns true if the character argument is a whitespace character.
isspace
The ______ function returns the uppercase equivalent of its character argument.
toupper
The _______ function returns the lowercase equivalent of its character argument.
tolower
The ________ file must be included in a program that uses character testing functions.
cctype
The _______ function returns the length of a string.
strlen
To _______ two strings means to append one string to the other.
concatenate
The ________ function concatenates two strings.
strcat
The ________ function copies one string to another.
strcopy
The ________ function searches for a string inside of another one.
strstr
The _______ function compares two strings.
strcmp
The ________ function copies, at most, n number of characters from one string to another.
strncopy
The _______ function returns the value of a string converted to an integer.
atoi
The _______ function returns the value of a string converted to a long integer.
atol
The _______ function returns the value of a string converted to a float.
atof
The _______ function converts an integer to a string.
itoa
Character testing functions such as isupper, accept strings as arguments and test each character in the string. (T/F)
False
If toupper’s argument is already uppercase, it is returned as is, with no changes. (T/F)
True
If tolowers’s argument is already lowercase, it will be inadvertently converted to uppercase. (T/F)
False
The strlen function returns the size of the array containing a string.
false, length not size
If the starting address of a C-string is passed into a pointer parameter, it can be assumed that all the characters, from that address up to the byte that holds the null terminator, are part of the string. (T/F)
True
C-string handling functions accept as arguments pointers to strings (array names or pointer variables), or literal strings. (T/F)
True
The strcat function checks to make sure the first string is large enough to hold both strings before performing the concatenation. (T/F)
False, no bound checking in C++
The strcpy function will overwrite the contents of its first string argument. (T/F)
True
The strcpy function performs no bounds checking on the first argument. (T/F)
True
There is no difference between “847” and 847. (T/F)
False