Page 30 - Modular_V2.0_C++_Flikpbook
P. 30
Exercise
A. Tick ( ) the correct option.
1. Which of the following is the Standard Output Stream?
a. cout b. cin
c. both a and b d. None of these
2. Which symbol represents the stream insertion operator?
a. << b. >>
c. /* and */ d. //
3. Which of the following symbols is used to represent extraction operator?
a. && b. //
c. << d. >>
4. How many words can you take as string by using the cin object?
a. 1 b. 3
c. 2 d. 5
5. Which of the following escape sequence characters is used to add double quotes?
a. /" b. \n
c. \" d. \\"
B. Write ‘T’ for true and ‘F’ for false.
1. The \\ escape sequence character is used to add a backslash. ……………………
2. The /* and */ symbols are used to add multiline comment. ……………………
3. Comments are executed by C++ compiler. ……………………
4. The endl manipulator is used to insert a line break. ……………………
C. Fill in the blanks using the words given below:
comments, cin, ostream, break
1. The \n escape sequence character is used to add a line …………………………..
2. …………………………. is part of the iostream library and works with the extraction operator.
3. Cout is part of the …………………………. class.
4. …………………………. enables us to understand the way a program works.
D. Short answer type questions.
1. How many types of comments are there in C++? Write their names.
2. What is the difference between \\ and // symbols?
3. What is the purpose of escape sequence characters?
28
Touchpad MODULAR (Ver. 2.0)

