Assignment 7 - CSC 124 1 Mark the following statements as...

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

View Full Document Right Arrow Icon
CSC 124 9-26-2007 1. Mark the following statements as true or false. A. The extraction operator >> skips all leading whitespace characters when searching for the next data in the input stream. True B. In the statement cin >> x; , x must be a variable True C. In the statement cin >> x >> y; requires the input values for x and y to appear on the same line. False D. The statement cin >> num; is equivalent to the statement num >> cin; False E. You generate the newline character by pressing the Enter (return) key on the keyboard. True F. The function ignore is used to skip certain input in a line. True 2. Suppose x and y are int variables and ch is a char variable. Consider the following input: 5 28 36 What value (if any) is assigned to x, y, and ch after each of the following statements executes? (Use the same input for each statement.) A. cin >> x >> y >> ch; 5 28 36 B. cin >> ch >> x >> y; 36 5 28 C. cin >> x >> ch >> y; 5 36 28 D. cin >> x >> y; cin.get (ch) ; 5 28 36 3. Suppose x and y are int variables and z is a double variable. Assume the following input data: 37 86.56 32 What value (if any) is assigned to x, y, and z after each of the following statements
Background image of page 1

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

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

This note was uploaded on 04/21/2008 for the course CSC 124 taught by Professor Salim during the Fall '07 term at California University of Pennsylvania.

Page1 / 3

Assignment 7 - CSC 124 1 Mark the following statements as...

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

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