Monday, October 22, 2018

Variables and Types

0 comments

Variables and Types 

Variables are basically memory locations, which hold some value in them. They are always assigned unique name for identification.
The Quantity that changes during the execution of a program is called a variable. Therefor variables are also called as identifiers.


Rules for forming variables name: -
# The first character of a variable name must be an alphabet or an under  score (_).
# Both upper case & lower-case variable are significant in ‘C’.
# Keyword should not to be used as a variable.
# Special character is not allowed.
Declaration of variables: -
 The declaration of variable in C information about: -
1-The name of a variable
2-The type of data to be stored by the variable.
Syntax: -
    data type variable name:
  Ex.- int a, char b, float c;

No comments:

Post a Comment