what is variables | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

what is variables

12th Sep 2016, 12:34 PM
jignesh
jignesh - avatar
4 Answers
+ 4
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.
12th Sep 2016, 1:50 PM
Andreas BeEm Kvist
Andreas BeEm Kvist - avatar
+ 3
A variable holds a value that you can change.
12th Sep 2016, 12:38 PM
Zen
Zen - avatar
- 2
ok
12th Sep 2016, 12:39 PM
jignesh
jignesh - avatar
- 2
very nice
12th Sep 2016, 8:56 PM
Doloop