+ 9
Where are variables store in computer?
I want to know if variables are stored in "RAM" or Hard Disk?
5 Réponses
+ 10
Variables are usually stored in Ram. the global variables are stored on the heap and variables declared in functions/methods are stored on stacks. Heap and Stack are both RAM. This is really a complex subject and there are register involved too.
+ 5
Anywhere where data can be stored, CPU registers, CPU cache, main RAM, and even the harddrive temporarily. (Operating systems can use swapping to save physical RAM space). In short the answer varies heavily, and depends on the compiler, operating system, language, and hardware.
+ 2
RAM
+ 1
RAM
- 3
vikram is cool and good