Either in registers or on the stack.
* These are all implementation defined. Access to `register' specified indentifiers should be as fast as possible, so the compiler may place the value in a machine register. However, the compiler is free to treat a `register' declaration as an `auto' declaration. * Where free memory is maintained is an OS specific concept. Instructions are generally stored in code segement. Local Variables are stored in Stack. Register variables are stored in Register. Global & static variables are stored in data segment. The memory created dynamically are stored in Heap And the C program instructions get stored in code segment.
AnswerLocal Variables are stored in Stack. Register variables are stored in Register. Global variables are stored in data segment. The memory created dynamically are stored in Heap And the C program instructions get stored in code segment and the extern variables also stored in data segment. Nooo NoooStatic variable will be stored in .BSS segment... (Block Started By Symbol)
It depends entirely on what platform you are using. In an embedded environment, for instance global/static variables go into different RAM memory segments depending on whether or not they are initialised. constants are often left in ROM automatic variables are normally placed of the stack of the currently running task but not always.
Auto variables are stored on the stack alongside all other local variables.
Dynamic variables are stored in a memory heap allocated to them at run time.
A register variables is that which got space in CPU internal register sets this requst can be granted or rejected by CPU ,by register veriable the processing speed become much faster for that variable.
The block they are declared in.
Stack.
They is not.
Stack.
in register
$_SESSION['name'] = "RAGHAV";