0

What are variables ? And what are their uses ?

28th Sep 2016, 12:58 PM
ram lal
5 Answers
+ 1
variables are temporal placeholders for storing values
28th Sep 2016, 1:18 PM
jerry
jerry - avatar
+ 1
A variable is a symbolic name for (or reference to) information. The variable's name represents what information the variable contains. They are called variables because the represented information can change but the operations on the variable remain the same. In general, a program should be written with "Symbolic" notation, such that a statement is always true symbolically. For example if I want to know the average of two grades, We can write "average = (grade_1 + grade_2) / 2.0;" and the variable average will then contain the average grade regardless of the scores stored in the variables, grade_1 and grade_2. /// quote.
28th Sep 2016, 1:22 PM
HawkEye
HawkEye - avatar
+ 1
Variable is a thing which stores the data according to its corresponding data type.. Eg:- int variable stores integer values . Consider x=2 . Here x is an integer variablr which stores the value 2
28th Sep 2016, 3:17 PM
Surya Swanoff
Surya Swanoff - avatar
0
Variables are places where you can store data, the four main types of data types are float, int, String, and char. Char is for storing characters Ex: a, f, u String is for storing multiple chars Ex: Hello int is for storing numbers, only full numbers ( no decimals or negative numbers) Ex: 6 double is basically an int with decimals and negative numbers Ex: -6, 6.6
28th Sep 2016, 8:00 PM
Chris
0
Thanks to all. Now i have understood the meaning of variables.
29th Sep 2016, 1:01 AM
ram lal