Constants in C interview questions


Total available count: 17
Subject - Programming Languages
Subsubject - Constants in C

What is Character Constant and explain the rules?

A character constant is simply a single character. 

The rules for constructing character constants are:

A character constant is a single character, a single digit, a single special symbol or a single escape sequence enclosed in '(single quote). 

Example:  
    
 . const char b = 'a'
 . const char c= 'A'
 . const char e = '1'
 . const char e = '@'
 . const char d = ' '

 

 




Next 5 interview question(s)

1

What is Constant?

2
What is Floating Point Constant?
3
What is Integer Constant?
4
What is String Constant?
5
Write a Macros or a simple piece of code can also be implemented with #define?


Comments