Which data type is used to represent a single character in C?
A. char
B. int
C. float
D. double
Answer: Option A
Solution(By Examveda Team)
The data type used to represent a single character in C is char. Thechar
data type is specifically designed to store individual characters, such as letters, digits, and symbols.So, the correct answer is:
Option A: char
In C programming, you declare a character variable like this:
char myChar = 'A';
Here,
myChar
is a variable of type char
, and it stores the character 'A'. The char
data type is essential for working with characters and strings in C.
Related Questions on C Fundamentals
What is the primary purpose of a function prototype in C?
A. Declare a variable
B. Declare a function
C. Define a function
D. Assign a value
What is the correct syntax for declaring a variable in C?
A. int variable_name;
B. variable_name = 5;
C. variable_name int;
D. int = variable_name;
Join The Discussion