Data and Variables
Variables are the small memory space to store the inputs. Basic types of variables are:
char: To store characters
int : To store numbers and integers
float :to store numbers with decimal
Each variable has a specific address in the memory. The declaration of variable is an important step. Variable declaration can be done inside the main () or out side it. The variable may be local and global based on its place of declaration.
Syntax for declaration of variable:
Type of variable space name of variable
int num;
char reply;
float weight;
No comments:
Post a Comment