Programming Basics Flashcards
Two types of scoping
Static and Dynamic
When a function is called, what operation occurs in stack?
PUSH
When a function is over, what operation occurs in stack?
POP
Within the same function, are multiple variable of the same name allowed?
NO
Where are local variables stored?
Stack
Where are global variables stored?
Static area
3 parts of main memory
Stack, Heap, Static area
To store in heap area , which keyword is used?
malloc
Which part of main memory is least in size?
Static area
Default value in static area?
0
Default value in stack area?
garbage
Global variable are allocated memory at which time?
Compile time
Static memory allocation allocates memory at?
Compile time
Static memory allocation is also known as?
Early Binding
In dynamic memory allocation, memory estimated at?
Runtime
Static can be mapped to?
Compiler
Dynamic can be mapped to?
Processor
&
Reference operator
*
Dereference operator
Local variable memory estimated at?
Runtime
Identify error : variable with same name declared twice in the same function
Multiple declaration error
Identify error: operation b/w two variable of different type
Type mismatch error
Identify error : variable used without declaration
Undeclared variable error
Solution of scope problem
Static scoping and Dynamic scoping