chtp5_08-TIF-Beta - 8.1Introduction 8.1. Which is not an...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
8.1 Introduction 8.1. Which is not an example of an application primarily concerned with text-processing? a) loader b) word processor c) page layout software d) computerized typesetting system ANS: (a) 8.2 Fundamentals of Strings and Characters 8.2 Which of the following is not true? (a) A string may include letters, digits, and various special characters (i.e., + , - , * ). (b) A string in C++ is an array of characters ending in the null character ( ‘\0’ ). (c) String literals are written inside of single quotes (d) A string may be assigned in a definition to either a character array or a variable of type char * . ANS: (c) 8.3. A character constant is a(n) __________ value represented as a character in single quotes. a) short b) int c) long d) double ANS: (b) 8.4. ‘\n’ represents the integer value of a) the character n b) the string n c) newline d) nextline ANS: (c) 8.5. + , \ and $ are all examples of __________. a) special characters b) strings c) operators d) literals ANS: (a) 8.6. A string in C is __________. a) an array of characters ending in the null string b) a sequence of characters contained within single quotes
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
c) a sequence of characters preceded by a length field d) an array of characters ending in the null character ANS: (d) 8.7. In C, it is appropriate to say that a string is a(n) __________. a) pointer b) integer c) double quote d) sequence of characters contained in single quotes ANS: (a) 8.3 Character Handling Library 8.8 The number 4 typically takes up _________ bit(s) when stored as a character on most of today’s computers. (a) 1 (b) 2 (c) 3 (d) 8 ANS: (d) 8.9 The function of the character-handling library is typically to manipulate characters as ___________. (a) integers. (b) floats . (c) longs. (d) bits. ANS: (a) 8.10 The isxdigit (is hex digit) function would return false on (a) a (b) A (c) 2 (d) g ANS: (d) 8.11. Which character handling library function returns a true value if its argument is a letter and 0 otherwise? a) isalphanumeric b) isalphabetic c) isalpha d) isletter ANS: (c) 8.12. Which character handling library function converts lowercase letters to uppercase
Background image of page 2
letters? a) lowertoupper b) isupper c) touppercase d) toupper ANS: (d) 8.13. Which of the following is not a whitespace character? a) ‘\n’ b) ‘\f’ c) ‘\r’ d) ‘\w’ ANS: (d) 8.14. Which character handling library function returns true if its argument is a printing character? a) ispchar b) isprintablechar c) isprint d) isprintchar ANS: (c) 8.4 String Conversion Functions 8.15. The strtol and stroul functions do not (a) need a special header file in order to be used. (b)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

chtp5_08-TIF-Beta - 8.1Introduction 8.1. Which is not an...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online