Ace
Learns
Theme
light_mode
dark_mode
light_mode
Light
dark_mode
Dark
monitor
Auto
Open main menu
menu_open
×
Home
History
Geography
Astronomy
Physics
Chemistry
Biology
Agriculture
Sports
Computer Science
Articles
Contact Us
MCQ Categories
Articles
Home
Contact Us
Home
»
Computer Science
»
Programming in C
»
Data Types in C
Programming in C
unfold_more
double_arrow
Data Types in C
double_arrow
Operators in C
quiz
Data Types in C
1.
What is the size of the char data type in C?
A)
8 bits
B)
2 bytes
C)
64 bits
D)
32 bits
Answer
keyboard_arrow_down
keyboard_arrow_up
A) 8 bits
Explanation
2.
Which of the following data types is used to store single-precision floating-point numbers in C?
A)
float
B)
double
C)
long double
D)
char
Answer
keyboard_arrow_down
keyboard_arrow_up
A) float
Explanation
3.
Which data type is used to store true/false values in C?
A)
int
B)
char
C)
bool
D)
float
Answer
keyboard_arrow_down
keyboard_arrow_up
C) bool
Explanation
4.
What is the purpose of the void data type in C?
A)
It indicates an empty argument list for a function.
B)
It represents the absence of data type.
C)
It is used to declare variables with no initial value.
D)
It is used for defining constant values.
Answer
keyboard_arrow_down
keyboard_arrow_up
B) It represents the absence of data type.
Explanation
5.
In C, which data type is used to store memory addresses?
A)
int
B)
pointer
C)
void
D)
char
Answer
keyboard_arrow_down
keyboard_arrow_up
B) pointer
Explanation
6.
Which data type does not occupy any memory space?
A)
char
B)
int
C)
float
D)
void
Answer
keyboard_arrow_down
keyboard_arrow_up
D) void
Explanation
7.
What would be the value of ‘a’ after execution of the following code?
int main() { int a, b = 5; char c = 'x'; a = b + c; printf("%d", a); return 0; }
A)
5
B)
x
C)
125
D)
5x
Answer
keyboard_arrow_down
keyboard_arrow_up
C) 125
Explanation
8.
Which data type’s size is consistent in both 32-bit and 64-bit operating systems?
A)
int
B)
char
C)
double
D)
long
Answer
keyboard_arrow_down
keyboard_arrow_up
B) char
Explanation
Quick Links
History
chevron_right
Enlightenment and Modern ideas
chevron_right
Medieval World History
chevron_right
Ancient Civilizations
chevron_right
Industrialization
Geography
chevron_right
Climatology
chevron_right
Geomorphology
chevron_right
Oceanography
chevron_right
Geopolitics and Global Issues
Computer Science
chevron_right
Computer Networks
chevron_right
Cloud Computing
chevron_right
Analysis and Design of Algorithms
chevron_right
Databases
Biology
chevron_right
Genetics
chevron_right
Plants
chevron_right
Cell Biology
chevron_right
The Human Body System