I am beginner in c programming, As far as I understand it is used to store decimal number and float number.
Code:#include <stdio.h> int main()
{
int a = 1;
char b ='G';
double c = 3.14;
printf("a = %d\n", a);
printf("b = %c\n", b);
printf("c = %lf\n", c);
return 0;
}
a = 1
b = G
c = 3.140000
but there is already int type to store decimal and float to store float number so what's the specific use of double data type in C language ?