Data Types
6.Which data type is used to store decimal numbers in C++?
-
A. int
-
B. char
-
C. float
-
D. bool
float
float
7.Which of the following is the default value for a bool type in C++?
-
A. 0
-
B. 1
-
C. true
-
D. false
false
false
8.In C++, which data type has the largest storage size by default?
-
A. int
-
B. long long
-
C. float
-
D. double
long long
long long
9.What is the size of the double data type in C++?
-
A. 4 bytes
-
B. 8 bytes
-
C. 16 bytes
-
D. 2 bytes
8 bytes
8 bytes
10.Which of the following data types can hold a sequence of characters in C++?
-
A. char
-
B. string
-
C. array
-
D. bool
string
string