In which area global, external variables are stored?
Answers were Sorted based on User's Feedback
Answer / vishnu
Global variables if not initialised when decleared then it
will be stored in BSS(Block Segmented by Symbol). If it is
initilised then it will be stored in Data area.
Extern variables are stored int Data area.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / samrat
Global & static variables are stored in data segment.
If we look at other types.. Local Variables are stored in the Stack. Register variables are stored in Register.
Dynamically allocated memory uses the Heap. Instructions are stored in code segment and the extern variables are stored in the data segment.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / mrinal
The global or external variables are stored on the HEAP.
| Is This Answer Correct ? | 2 Yes | 7 No |
write a program that finds the factorial of a number using recursion?
Convert a distance from miles to kilometers .there are 5280 feets per mile,12 inches per foot .2.54 centimeters per inch and 100000centimeters per kilometer
#include<stdio.h> int main( ) { Int a=300, b, c; if(a>=400) b=300; c=200; printf(“%d%d ”, b, c); return0; }
How does struct work in c?
Can a function argument have default value?
in b=6.6/a+(2*a+(3*c)/a*d)/(2/n); which operation will be performed first a) 6.6/a b) 2*a c) 3*c d) 2/n
Write a C program where input is: "My name is xyz". output is: "xyz is name My".
What are the uses of null pointers?
What is structure in c explain with example?
Is null valid for pointers to functions?
Why do we use stdio h and conio h?
what value is returned to operating system after program execution?