Exam 9: Character Strings

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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)

In C, a string is stored as a ____ array of characters.

(Multiple Choice)
4.8/5
(38)

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)

A string literal is also referred to as a character set.

(True/False)
4.8/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)

The function ____ appends str2 to the end of str1.

(Multiple Choice)
4.8/5
(45)

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
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)