02] a] List the basic data types available in C. Explain with an example.
Integer (int) :-
Data type that can store non-decimal numbers in memory.
ex:-
#include <stdio.h>
void main()
{
int i = 0;
printf(“The integer value is: %d \n”, i);
}
Floating point (float) :-
Data type that can store decimal numbers in memory locations are called float/real data types.
ex:-
#include <stdio.h>
void main()
{
float f = 0.000;
printf(“The float value is: %f \n”, f);
}
Character (char) :-
Data type used to store single character in memory locations is called character type.
ex:-
#include <stdio.h>
void main()
{
char c;
c = ‘b’;
printf(“The character value is: %c \n”, c);
}