Professional Documents
Culture Documents
Coding For Beginners: Introduction To Variables and Datatypes
Coding For Beginners: Introduction To Variables and Datatypes
do if static while
Int main()
{
int principal, rate, nyears, interest;
principal = 1000;
rate = 8;
nyears = 5;
interest = ( principal * rate * nyears ) / 100;
printf(“ Simple interest of %d rupees for %d years with %d rate of interest is %d.”, principal,
nyears, rate, interest);
}
DATA TYPES
• The data type in C defines the amount of storage allocated to variables ,the
values that they can accept ,and the operation that can be performed on
those variables
• C is rich in data types.
• The verity of data type allow the programmer to select appropriate data
type to satisfy the need of application
CLASSES OF DATA TYPES