Exam 9: Character Strings
Exam 1: Introduction to Computer Programming44 Questions
Exam 2: Getting Started in C Programming46 Questions
Exam 3: Processing and Interactive Input48 Questions
Exam 4: Selection44 Questions
Exam 5: Repetition47 Questions
Exam 6: Modularity Using Functions: Part I51 Questions
Exam 7: Modularity Using Functions: Part II49 Questions
Exam 8: Arrays48 Questions
Exam 9: Character Strings51 Questions
Exam 10: Data Files50 Questions
Exam 11: Arrays, Addresses, and Pointers49 Questions
Exam 12: Structures48 Questions
Exam 13: Dynamic Data Structures49 Questions
Exam 14: Additional Capabilities55 Questions
Exam 15: A Brief Introduction to C++49 Questions
Select questions type
The ____ function continuously accepts and stores the characters typed at the terminal into the character array passed as an argument.
(Multiple Choice)
4.9/5
(36)
The statement ____ is a direct replacement for the statement puts(message);.
(Multiple Choice)
4.9/5
(40)
Trying to enter the characters This is a string using the statement gets(message); results in the word This being assigned to the message array.
(True/False)
4.9/5
(32)
Line 5 in the function below can be replaced with ____.
1 void strcopy (char string1[], char string2[])
2 {
3 int i = 0;
4
5 while (string2[i] != '\0')
6 {
7 string1[i] = string2[i];
8 i++;
9 }
10 string1[i] = '\0';
11 }
(Multiple Choice)
4.9/5
(37)
Programs that use the isalpha() routine must include the ____ header file.
(Multiple Choice)
4.7/5
(35)
Typically, the ____ function is used to "assemble" a string from smaller pieces until a complete line of characters is ready to be written, either to the standard output device or to a file.
(Multiple Choice)
4.7/5
(38)
If the contents of a string variable named destString are "Hello", then the function call strcat(destString, " there World!") results in the string value ____ being assigned to destString.
(Multiple Choice)
4.8/5
(33)
In C, the individual characters in a string can be input, manipulated, or output using standard array-handling techniques utilizing either subscript or pointer notations.
(True/False)
4.8/5
(33)
Complete the following function:
/* copy string2 to string1 */
Void strcopy(char string1[], char string2[])
{
Int i = 0;
While (string2[i] != '\0')
{
String1[i] = string2[i];
I++;
}
____
}
(Multiple Choice)
4.9/5
(34)
The first 256 characters of the Unicode code are identical to the complete 256-character ASCII code.
(True/False)
4.9/5
(42)
Pressing the Enter key at the terminal generates a newline character, ____.
(Multiple Choice)
4.9/5
(33)
When using ____, a full path name requires that two backslashes be used to separate individual directory and filenames.
(Multiple Choice)
4.7/5
(30)
toupper() returns the uppercase equivalent of its argument if the character is lowercase; otherwise, it returns NULL.
(True/False)
4.9/5
(51)
The ____ routine provides for the input of individual characters.
(Multiple Choice)
4.8/5
(39)
The ____ function stops accepting characters only when a newline is detected.
(Multiple Choice)
4.8/5
(41)
Line ____ in the following section of code checks for the end-of-string character.
1 void strcopy (char string1[], char string2[])
2 {
3 int i = 0;
4
5 while (string2[i] != '\0')
6 {
7 string1[i] = string2[i];
8 i++;
9 }
10 string1[i] = '\0';
11 }
(Multiple Choice)
4.7/5
(36)
When using #include, the characters ____, tell the compiler to begin searching for the included file in the C compiler system library directory.
(Multiple Choice)
4.8/5
(36)
Showing 21 - 40 of 51
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)