Chapter 10 Flashcards Preview

Computer Science > Chapter 10 > Flashcards

Flashcards in Chapter 10 Deck (33)
Loading flashcards...
1

What header file must you include in a program using character testing functions such as isalpha and isdigit?

cctype

2

What header file must you include in a program using the character conversion functions toupper and tolower?

cctype

3

What header file must you include in a program using string functions such as strlen and strcpy?

cstring

4

What header file must you include in a program using string/numeric conversion functions such as atoi and atof?

cstdlib

5

What header file must you include in a program using string class objects?

cstring

6

How do you compare string class objects?

With standard relational operators

7

The ______ function returns true if the character argument is uppercase.

isupper

8

The ______ function returns true if the character argument is a letter of the alphabet

isalpha

9

The ______ function returns true if the character argument is a whitespace character

isspace

10

The ______ function returns the uppercase equivalent of its character argument

toupper

11

the ______ function returns the lowercase equivalent of its character argument

tolower

12

the ______ file must be included in a program that uses character testing functions

cctype

13

The ______ function returns the length of a string

strlen

14

To ______ two strings means to append one string to the other

concatenate

15

The _____ function concatenates two strings

strcat

16

The _____ function copies one string to another

strcopy

17

The ______ function searches for a string inside of another one

strstr

18

the ______ function compares two strings

strcmp

19

The ______ function copies, at most, n number of characters from one string to another

strncopy

20

The ______ function returns the value of a string converted to an integer

atoi

21

The ______ function returns the value of a string converted to a long integer

atol

22

The ______ function returns the value of a string converted to a float

atof

23

The ______ function converts an integer to a string

itoa

24

Character testing functions such as isupper, accept strings as arguments and test each character in the string. (T/F)

False

25

If toupper's argument is already uppercase, it is returned as is, with no changes. (T/F)

true

26

If tolowers's argument is already lowercase, it will be inadvertently converted to uppercase. (T/F)

False

27

The strlen function returns the size of the array containing a string. (T/F)

False

28

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

29

C-string handling functions accept as arguments pointers to strings (array names or pointer variables), or literal strings. (T/F)

True

30

The strcat function checks to make sure the first string is large enough to hold both strings before performing the concatenation. (T/F)

False