0% found this document useful (0 votes)
20 views

C Programming

This document summarizes common C data types including their size in bits, range of values, format specifiers, and supported operators. It lists basic numeric types like char, int, float, and double along with their signed and unsigned variants. Larger integer types long and long long are also included with sizes of 32 and 64 bits respectively. Common arithmetic, assignment, comparison, logical and bitwise operators supported by these types are listed as well.

Uploaded by

Simanta De
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

C Programming

This document summarizes common C data types including their size in bits, range of values, format specifiers, and supported operators. It lists basic numeric types like char, int, float, and double along with their signed and unsigned variants. Larger integer types long and long long are also included with sizes of 32 and 64 bits respectively. Common arithmetic, assignment, comparison, logical and bitwise operators supported by these types are listed as well.

Uploaded by

Simanta De
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Simple data types

Type
char
unsigned char
signed char
int
unsigned int
signed int
short int
unsigned short int
signed short int
long int
long long int
signed long int
unsigned long int
unsigned long long int
float
double
long double

Size
(bit)
8
8
8
32
32
32
16
16
16
32
64
32
32
64
32
64
80

Range
-27 to 27-1
0 to 28-1
27 to 27-1
-231 to 231-1
0 to 232-1
Same as int
-215 to 215-1
0 to 216-1
Same as short int
-231 to 231-1
-263 to 263-1
Same as long int
0 to 232-1
0 to 264-1
1E37 to 1E+37 with six digits of precision
1E37 to 1E+37 with ten digits of precision
1E37 to 1E+37 with ten digits of precision

Operators
Arithmetic: +, -, *, /, %
Assignment: =
Augmented assignment: +=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>=
Bitwise logic: ~, &, |, ^
Bitwise shifts: <<, >>
Boolean logic: !, &&, ||
Conditional evaluation: ? :
Equality testing: ==, !=
Increment and decrement: ++, -Member selection: ., ->
Object size: sizeof
Order relations: <, <=, >, >=

Format
Specifier
%c
%c
%c
%d
%u
%d
%hi
%hu
%hi
%li
%lli
%li
%lu
%llu
%f
%lf
%Lf

You might also like