Q3
Which data type is used to represent a single character in C?
A.
char
AnswerB.
int
C.
float
D.
double
Answer: Option A
Solution
Answer: Option A
Solution:
The data type used to represent a single character in C is char. The char 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.