Variable declarations is the most important thing in C program. Fist of all we want to know what is variable? Variable is a symbol or name that stands for a value.X and Y are variables. Variable is represent numerical value, characters, characters string etc. Variable play an important rule in computer programing. For using a variable in program you mast declared that variable. There are many kinds of variable such as integer type variable, float type variable, character type variable etc.
Now we learn how to declared a variable in C program. A variable mast be declared after the main function. If you want to declared a integer type variable in your program, after main function you write this:
int a,b,c;
If the variable type is float you can write
float a,b,c;
Now i writer a program for declared a variable
/* Declared a variable */
#include<stdio.h>
main()
{
int a,b,c,d;
float x,y,z;
getch();
}
This program can not give any out put. This is a program for declared variable.
(post by Arnob)
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন