The document discusses primary and derived data types in C, including integer, floating point, character, and boolean types along with their format specifiers and typical ranges. It also covers rules for constructing variable names in C which must start with a letter or underscore and can include letters, digits, and underscores but no special characters or blanks. Finally, it mentions keywords in C which are reserved words that cannot be used as variable names.
The document discusses primary and derived data types in C, including integer, floating point, character, and boolean types along with their format specifiers and typical ranges. It also covers rules for constructing variable names in C which must start with a letter or underscore and can include letters, digits, and underscores but no special characters or blanks. Finally, it mentions keywords in C which are reserved words that cannot be used as variable names.
The document discusses primary and derived data types in C, including integer, floating point, character, and boolean types along with their format specifiers and typical ranges. It also covers rules for constructing variable names in C which must start with a letter or underscore and can include letters, digits, and underscores but no special characters or blanks. Finally, it mentions keywords in C which are reserved words that cannot be used as variable names.
r Specifier 1 Character or %c 1 byte -128 to 127 or 0 to 255 char a,b,c; Signed Character 2 Unsigned %c 1 byte 0 to 255 unsigned char a,b,c; character 3 Short Integer %d 2 byte -32,768 to 32767 short a; 4 Int or signed int %d 2/4 bytes -32,768 to 32767 (for 2 int a,sum; / signed int bytes) a,sum; 5 Unsigned int %u 2/4 byes 0 to 65535 (2 bytes) unsigned int a,b,sum; 6 Long Integer %l 8 bytes long m,n; 5 Float %f 4 bytes 3.4E-38 to 3.4E+38 float a,b; 6 Double %lf 8 bytes 1.7E-308 to 1.7E+308 doule m,n; 7 Long double %LF 10 bytes 3.4E-4932 to long doulbe m,n; 1.1E+4932 Rules For Constructing VARIABLE Names
1. A variable name is any comination of 1 to 31 aplhabets, digits or underscore. (Depend on
complier, some may allow up to 247 character) 2. The first character in the variable name must be an aplabet orunderscore. 3. No commas or blanks are allowd within a variable name. 4. No special symbol other than an underscore can be used in variable name.