Chtp5_09-TIF-Beta - 9.1Introduction 9.1 Which function does not use either the standard input stream or the standard output stream a gets b getchar

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

View Full Document Right Arrow Icon
9.1 Introduction 9.1. Which function does not use either the standard input stream or the standard output stream? a) gets b) getchar c) gettime d) scanf ANS: (c) 9.2 Streams 9.2 Each line of a stream consists of ________ or more characters and ends with the ________. (a) 0, space character (b) 1, newline character (c) 0, newline character (d) 1, space character ANS: (c) 9.3 Which of the following is not a standard C Formatted stream? (a) standard input stream (b) standard error stream (c) standard output stream (d) standard redirection stream ANS: (d) 9.4. Each line in a C stream ends in a __________ character. a) ENDLINE b) EOF c) NULL d) newline ANS: (d) 9.5. Which statement about line length is true (as stated in the C standard). a) Lines can be arbitrarily long. b) C implementations must support lines of at least 245 characters. c) C implementations must support lines of at least 254 characters. d) C implementations must support lines of at least 256 characters. ANS: (c) 9.6. Which statement about the standard streams is true? a) The standard input stream must be connected to the keyboard. b) The standard output stream must be connected to the screen. c) The standard error stream is connected to the screen. d) Streams may not be redirected. ANS: (c) 9.3 Formatting Output with  printf 9.7 Which of the following does not represent a capability of the printf  function? (a) center justification of outputs (b) left justification of outputs (c) right justification of outputs (d) inserting literal characters at precise locations in a line of output ANS: (a)
Background image of page 1

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

View Full DocumentRight Arrow Icon
9.8. Which is not a part of a format control string? a) conversion specifiers b) flags, c) field widths d) printf ANS: (d) 9.9. Which is not a formatting capability of printf ? a) left justification b) centering c) right justification d) aligning a column of numbers so that decimal appoints appear one above the other ANS: (b) 9.10. Which is not a formatting capability of printf ? a) representing unsigned integers in binary format b) representing unsigned integers in decimal format c) representing unsigned integers in hexadecimal format d) representing unsigned integers in octal format ANS: (a) 9.11. A printf format control string must be enclosed in a) slashes b) /* Ö */ c) single quotes d) double quotes ANS: (d) 9.4 Printing Integers 9.12 Which of the following is not a valid conversion specifier for the printf  statement? (a)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/13/2011 for the course C PROGRAMM ES 112 taught by Professor Serdar during the Spring '11 term at Yeditepe Üniversitesi.

Page1 / 8

Chtp5_09-TIF-Beta - 9.1Introduction 9.1 Which function does not use either the standard input stream or the standard output stream a gets b getchar

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

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