Which of the following is valid single character constant in C?Choose the correct option from the given options.
(a) 'a'
(b) '\a'
(c) "a"
(d) Both a and b
Answers
Answered by
4
(a) 'a'.............
Answered by
4
'a' is a valid single character constant in C.
Answer: Option (a)
Explanation:
Constants in "C" are also like variables with fixed values. The following are C constants.
- An "Integer Constant" must have at least one digit without decimal.
- A "Real Constant" must have one digit at least with decimal
- A "Character and String Constant" comprise of a single alphabet, digit or a special character within single quotes.
- A "Backslash Character Constants" is preceded with backslash character for making a specific function of them.
Similar questions