Constants and Literals in C

Constants & Literals

Constants :

Constants are the fixed value that may not change during program execution.

Literals :

Literals are the values assigned to the constant variables.


Constants can be any of basic data types such as int, char, float etc.

Constants can be define using const keyword or #define preprocessor.

Example

        
const int num = 25;	(using const keyword)
#define PIE 3.14    (using #define preprocessor)
        
    

Post a Comment

0 Comments