Type of C constants

C constants can be divided into two major categories : (a) Primary Constants (b) Secondary Constants these constant are further are categorized as shown in in figure. At this stage, we would restrict our discussion to only primary constants, namely, Integer, Real and Character constants. Let us see the details of each of these constants. For constructing these different types of constants, certain rules have been laid down. These rules are as under. Rules for Constructing Integer Constants (a) An integer constant must have at least one digit. (b) It must not have a decimal point. (c) It can be either positive or negative. (d) If on sign precedes an integer constant, it is assumed to be positive. (e) No commas or blanks are allowed within an integer constant. (f) The allowable range for integer constant is -2147483648 to +2147483647. Ex :- 482 ...