Write a C program in which to declare all data type like integer, double, float, long int, and print value in specified format

Write a C program in which to declare all data type like integer, double, float, long int, and print value in specified format

C Program in which to declare all data type and print value in specified format

Algorithm-:

1. Program start.

2. Declaration of variable a, b, c, and d

3. Input the value in variable

4. Display the value of a, b, c, d, and ch

5. Program end

 Flowchart

Write a C program in which to declare all data type like integer, double, float, long int, and print value in specified format
#include<stdio.h>
#include<conio.h>
void main()
{  int a;
   long int d;
   double b;
   float c;
   printf("enter the value of a,b,c and d ");
   scanf("%d %lf %f %d",&a,&b,&c,&d);
   printf("value of a=%d b=%lf c=%f d=%d",a,b,c,d);
   getch();
}

Output -:

Write a C program in which to declare all data type like integer, double, float, long int, and print value in specified format

Conclusion

Friends, If you have difficulty to understand any program or have any doubts or questions, then tell me in the comment below.

Jeetu Sahu is A Web Developer | Computer Engineer | Passionate about Coding, Competitive Programming, and Blogging

Leave a Comment