C Programming Lectures...Introducing Variables....


Introducing Variables......
Entity whose value changes during the execution of a program.We can use variables to represent Constants, Functions, Arrays & the Names of Files.Variable names can be like this..........age, name, address, marks, area, calculator  etc.
Note-
While providing variable names please  follow given instructions...
  1. Use alphabet or Underscore( _ ) as the 1st character.
  2. Do not use commas, blank spaces, keywords & special characters.
Examples-
name
age
ANNUAL_SALARY
net_salary_2014
area_of_square


Declaring Variables-
Syntax(Rule)
data_type variable_list; (Followed by semicolon)
Example-
char name;
int  age;
double  ANNUAL_SALARY;
float  net_salary_2014;
int  area_of_square;

Initializing Variables-
Syntax(Rule)
data_type variable_name=value;
Example-
int age=25;
char name='Y';


Comments

Popular posts from this blog

Run Commands Either Works in the Windows XP or Windows 7 or Both Operating Systems