c program to print the value of a variable:- today we will learn how to print variables values.c program to print the value of a variable (integer and float ).

c program to print the value of a variable
Q. write a program to print the value of the variable (integer and float value)
for Integer:-
- #include<stdio.h>
- #include<conio.h>
- void main()
- {
- int a=8;
- clrscr();
- printf(” %d”,a);
- getch();
- }
for float:-
#include<stdio.h>
#include<conio.h>
void main()
{
float a;
clrscr();
sacnf(“%d”,&a);
printf(“%f “,a);
getch();
}
Output:
for integer
8
for float
3
Also, read these articles
- c language introduction
- C language character set definition
- c language tokens best notes in easy language
- C language keywords and their types
- print your name using c program in turb0 c++
- constant in c language notes
summery
I hope this article helped you in your education.
You can get more large information about tokens and incoming new articles. Let’s follow our blog and support us.
if you have any queries or questions regarding this article you can ask in the comment section. we will reply to you as soon as possible.