0

what is variable

16th Sep 2016, 10:56 PM
amit kumar
amit kumar - avatar
5 Antworten
+ 6
A variable is like a box. You create a box with a name. int x; // Empty variable, Empty box. int y = 5; // Here we put 5 into this variable or box. Console.Write(y); // Here we open the box and use what we put inside it. So the output will be 5. // With our empty box x, we can put values inside of it. x = 10; // Here we open our box and puts 10 inside it. It's the same thing with all variable types.
16th Sep 2016, 11:10 PM
Andreas BeEm Kvist
Andreas BeEm Kvist - avatar
+ 6
A variable holds a value which can be changed during the execution of the program. int myVar; //declaration of a variable of type int (integer) myVar = 42; //assignment of the value 42 Console.Writeln(myVar); //prints the value
16th Sep 2016, 11:42 PM
Zen
Zen - avatar
+ 2
variable is used to store Data Values (storage location)
24th Sep 2016, 6:05 AM
Rohit Patel
Rohit Patel - avatar
+ 2
variable is a container that stores the data
27th Sep 2016, 5:28 AM
Vishwanath Patil
Vishwanath Patil - avatar
- 2
wow superb answers
21st Sep 2016, 2:04 AM
venkata veerendra manikumar kancharla
venkata veerendra manikumar kancharla - avatar