Font size
WorksheetsCSNP-04103 - Chapter 12 - C-Strings
Total questions: 10
Worksheet time: 5mins
The function "isspace" is part of the class:
<string>
<iostream>
<cctype>
<cstring>
The function "isprint" is used for:
Print to the screen
Print to a file
Detect if the argument is a printable character
None of these answers.
The function "tolower"
Converts an uppercase argument to lowercase
Reduces a number to its minimum expression
Changes a numeric argument for its immediate lower numeric value
Does not exist in C++
A C-string is:
a sequence of characters stored in adjacent memory locations and terminated by NULL character
Is the same as a String
It is an array of strings
It is a dynamic vector or characters
While working with C-Strings NULL is:
Is a pointer to the first element of an array of characters
Is used to indicate the end of a character
Is the initial value of a pointer
Is used to indicate the end of a string
A C-String can be represented by
A String literal
A Pointer to a char
An array of characters
A Vector
The function strlen is part of
The <string> class
The <iomanip> class
The <cctype> class
The <iostream> class
The function <strcmp>:
Compares strings stored at two addresses
Compares strings stored at a adjacent addresses
Compares 2 numbers
None of the answers
The function "stoi()":
Is part of the <cctype> class
Is part of the <string> class
Converts a string to a long
Does not exist in C++
The function c_str():
Converts a cstring into a string
Converts an array of characters to a string
Converts a string into a cstring
Converts a integer into a string
