Questions about this topic? Sign up to ask in the talk tab.

Variable

From NetSec
Revision as of 23:39, 29 September 2012 by Jewel (Talk | contribs)

Jump to: navigation, search

Something that contains data, for example, if you declare a variable "int x = 1", the variable x will contain the integer value of 1.

A variable is a storage location for something which holds a value which could be either known or unknown. It can be/is liable to change and is not persistent. We can set data to names and these are our variables. For example:

Name = "This is a string"

In programming, there are many different ways to do this in a lot of different languages. Some have limits to how much data the variable can store and others are unlimited. The variable will hold the data assigned to it until a new value is assigned or the program holding it is finished.