Dev C++ short unsigned short signed short int unsigned int signed int long unsigned long signed long char unsigned char signed char float double long double Since, Dev C++ provides bytes to int and long, any one of these types can be used to handle bigger integer values while writing programs in Dev C++. Note: sizeof( ) is an operator which gives the size of a data type. Number Suffixes in C++ There are different suffixes for integer and floating point numbers. Suffix can be used to assign the same value as a different type.
For example, if you want to store in int, long, unsigned int and unsigned long int, you can use suffix letter L or U (either case) with i.e. 45L or 45U . This type of declaration instructs the compiler to store the given values as long and unsigned. ‘F’ can be used for floating point values, example: .14F .
Variables Variables are user-defined names assigned to specific memory locations in which the values are stored. Variables are also identifiers; and hence, the rules for naming the identifiers should be followed while naming a variable. These are called as symbolic variables because these are named locations. There are two values associated with a symbolic variable; they are R -value and L -value.
• R-value is data stored in a memory location • L-value is the memory address in which the R-value is stored. Chapter Page - - num2 num1 Variable name R - value (Value within memory) L - value (Memory Address) 0x125e 0x126e 0x127e 0x128e 0x129e 0x130e 0x131e 0x132e 0x133e 0x134e Figure . Memory allocation of a variable Remember that, the memory addresses are in the form of Hexadecimal values . .
Declaration of Variables Every variable should be declared before they are actually used in a program. Declaration is a process to instruct the compiler to allocate memory as per the type