Topic: Chapter 9: Introduction to C++ (Test 1)



Topic: Chapter 9: Introduction to C++
Q.1
How many categories of data types available in C++?
A. 5
B. 4
C. 3
D. 2
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report
Q.2
Which of the following data types is not a fundamental type?
A. signed
B. int
C. float
D. char
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.3

What will be the result of following statement?

char ch= ‘B’;

cout << (int) ch;
A. B
B. b
C. 65
D. 66
Answer : Option D
Explaination / Solution:
No Explaination.


Workspace
Report
Q.4
Which of the character is used as suffix to indicate a floating point value?
A. F
B. C
C. L
D. D
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.5
How many bytes of memory allocates for the following variable declaration if you are using Dev C++? short int x;
A. 2
B. 4
C. 6
D. 8
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.6

What is the output of the following snippet?

char ch = ‘A’;

ch = ch + 1;

A. B
B. A1
C. F
D. 1A
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.7
Which of the following is not a data type modifier?
A. signed
B. int
C. long
D. short
Answer : Option B
Explaination / Solution:
No Explaination.


Workspace
Report
Q.8
Which of the following operator returns the size of the data type?
A. sizeof( )
B. int ( )
C. long ( )
D. double ( )
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.9
Which operator to be used to access reference of a variable?
A. $
B. #
C. &
D. !
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report
Q.10
This can be used as alternate to endl command:
A. \t
B. \b
C. \0
D. \n
Answer : Option D
Explaination / Solution:
No Explaination.


Workspace
Report