Variables | Sololearn: Learn to code for FREE!

0

# Variables

So I don’t get variables that well how can I use them?

11/17/2018 2:52:01 PM

Nate

5 Answers

New Answer

+18

Variable is a data container for any program you have created Example int container=25; (int) is data container type (container) is data container have a value is 25 // Happy coding ;)

+12

variables are called variables because their value can vary . 1,2,3,e,pi etc have some fixed values so are called constants variables can take value of multiple constants , example : int x = 1; //x is 1 x=2; //x is 2 now //U see how variable x changed from 1 to 2 , well that is the use of variable , we can change its value //we also have final variables which behave like a constant whose value can't be changed

+3

variables are used to store information in a specific place... so when you use them, the computer knows where to retrieve that information. They can be used in various ways. think of a calculator... when you enter a number it is placed in a variable. then when you do a calculation. it will retrieve those numbers and calculate a result which is also stored in a variable :)

+1

Variable is nothing but the symbolic name given to a memory location. The property of the variable is that it changes during the execution of program e.g)int abc=10; In this example a memory location named abc holds the value 10 The value at any memory location is accessed using the variable

0

https://www.sololearn.com/Discuss/1351993/?ref=app https://www.sololearn.com/Discuss/1433136/?ref=app There are already similar (if not identical) questions posted, such as the one(s) above. You can find the answers using the search bar. Please help keep the quality of posts high in this section of the forum, SoloLearn servers uncluttered, and app latency low by reviewing the following: https://www.sololearn.com/Blog/38/8-simple-rules-to-get-help-from-the-community/ Be sure not to miss the link to the Community Guidelines toward the bottom of the article. Happy coding! P.S. Please see the following post for a humorous interpretation (but still an earnest plea). https://www.sololearn.com/post/10362/?ref=app