Exam 9: Character Strings

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

____ does not produce the same result as char test[5] = "abcd";.

Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
Verified

C

In C, a string is terminated by a special end-of-string symbolic constant named NULL.

Free
(True/False)
4.8/5
(35)
Correct Answer:
Verified

True

C provides built-in operations for complete arrays, such as array assignment or array comparison.

Free
(True/False)
4.9/5
(42)
Correct Answer:
Verified

False

strng[++i] shows an example of the use of the postfix increment operator.

(True/False)
4.9/5
(46)

In C, assignment and relational operations are not provided for strings.

(True/False)
4.8/5
(37)

In general, a scanf() function call can always be used in place of a gets() function call.

(True/False)
5.0/5
(41)

In C, '\n' is the sentinel marking the end of the string.

(True/False)
4.8/5
(43)

The array char message[81]; can be used to store a string of up to ____ characters.

(Multiple Choice)
4.8/5
(38)

Attempting to copy a larger string value into the destination array using strcpy causes the copy to overflow the destination array beginning with the memory area immediately following the last array element.

(True/False)
4.9/5
(24)

The statement ____ displays the message Have a Happy Day, right-justified, in a field of 25 characters.

(Multiple Choice)
4.9/5
(43)

One of the most common methods of validating input data is to accept all numbers as strings.

(True/False)
4.8/5
(34)

gets() substitutes \0 when an \n is encountered.

(True/False)
4.9/5
(32)

Programs that use the atoi() routine must include the ____ header file.

(Multiple Choice)
4.8/5
(35)

The value assigned to the NULL constant is ____.

(Multiple Choice)
4.9/5
(40)

puts() substitutes \0 when an \n is encountered.

(True/False)
4.9/5
(41)

The NULL statement is '\0';.

(True/False)
4.8/5
(41)

The getchar() and putchar() functions deal with strings as complete units.

(True/False)
4.9/5
(37)

The char[] itoa(string) function converts an integer to an ASCII string.

(True/False)
4.8/5
(30)

____ is an example of a string.

(Multiple Choice)
4.9/5
(32)

Both '\n' and "\n" are recognized by the compiler as containing the newline character.

(True/False)
4.9/5
(45)
Showing 1 - 20 of 51
close modal

Filters

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