Which data type is used to represent a single character in C?

Which data type is used to represent a single character in C?

a) int
b) float
c) char
d) double

Answer:

c) char

Explanation:

The char data type in C is used to represent a single character. It typically occupies 1 byte of memory and can hold any character from the ASCII character set. The char type is essential for handling individual characters and for working with strings in C, which are arrays of char types.

Understanding the char data type is fundamental for text processing and string manipulation in C programming.

Reference links:

https://www.rameshfadatare.com/learn-c-programming/

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top