Data Types
1.Which of the following is a built-in data type in C++?
-
A. string
-
B. int
-
C. vector
-
D. array
int
int
2.Which data type is used to store a single character in C++?
-
A. int
-
B. float
-
C. char
-
D. string
char
char
3.What is the size of the float data type in C++?
-
A. 2 bytes
-
B. 4 bytes
-
C. 8 bytes
-
D. 16 bytes
4 bytes
4 bytes
4.Which of the following data types is used to store large integers in C++?
-
A. short
-
B. long
-
C. int
-
D. long long
long long
long long
5.Which of the following is the correct way to declare a pointer to an int in C++?
-
A. int* ptr;
-
B. ptr int;
-
C. int ptr*;
-
D. *int ptr;
int* ptr;
int* ptr;