Variable
In computer programming, variables refer to a particular location in the memory that holds a value. Variables are equivalent to their assigned values.
A variable is made up of a name (identifier) that represents a value stored in a computer's memory. It consists of a memory location where data can be stored and manipulated in a program. The value assigned to a variable can change during program execution.
A pointer is a variable just like any other, so of course it can be assigned a value. However, being a pointer, the value must be a memory address. If you want to assign a value to that memory address rather than the pointer, you must dereference the pointer.
22
A variable is a placeholder that represents a value in computer programming. It can store different values depending on the context and can be manipulated or changed throughout the program execution.
Whenever anything is stored in the memory of your computer (RAM) it is stored at a specific place. Each specific place in your memory has its address that can be used to tell computer programs to go to those addresses to perform actions on the object stored at that address. It is similar to how you have your house number.
Every day this value is changing. :) there is no set value.
Varible
It is spelled variable, and is simply a placeholder. You can assign a value to a variable, which points at the memory base of the value. A variable can be called almost anything, however there are certain things they cannot be named. Read some C programming tutorials for a complete explanation of variables.
Pointers hold reference to variable value which is already declared in memory. Say suppose $x = 2; // Here variable is assigned value 2 in memory Now $y = &$x; // This basically points to the variable which is already allocated the value The use of pointers could greatly reduce memory usage if used correctly.
A variable typically consists of a name, a data type, a value, and a memory location where the value is stored. The name is used to reference the variable in the code, the data type defines the type of data the variable can hold, the value is the actual data stored in the variable, and the memory location is where the value is stored in the computer's memory.
Downloading a song into an idpod does not make it weigh any more. The song is written into the memory. And computer memory is only a change in the magnetic charge of a small memory byte. The memory chip does not change its physical characteristics. Computer memory is best illustrated by a group of light bulbs. A light bulb is turned ON for a value and turned OFF for another value. The combination of ON and OFF would equate to a number. The light bulbs didn't change weight. The difference with computer memory is that when one is turned "on", then it remains "on" without the requirement for more electric current.