In which area global, external variables are stored?

Answers were Sorted based on User's Feedback



In which area global, external variables are stored?..

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

In which area global, external variables are stored?..

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

In which area global, external variables are stored?..

Answer / mrinal

The global or external variables are stored on the HEAP.

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More C Interview Questions

What does void main () mean?

0 Answers  


#include<stdio.h> int fun(); int i; int main() { while(i) { fun(); main(); } printf("hello \n"); return 0; } int fun() { printf("hi"); } answer is hello.how??wat is tat while(i) mean?

7 Answers   Intel,


What is main () in c?

0 Answers  


Why isn't it being handled properly?

0 Answers  


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

0 Answers   TCS,






how we can make 3d venturing graphics on outer interface

1 Answers   Microsoft,


What is difference between scanf and gets?

0 Answers  


Can we increase size of array in c?

0 Answers  


struct abc { unsigned int a; char b; float r; }; struct xyz { int u; struct abc tt; }ww; ww = (struct xyz*)malloc(sizeof(struct xyz)); will the memory be allocated for the inner structure also?

1 Answers   Wipro,


Explain what is the use of a semicolon (;) at the end of every program statement?

0 Answers  


Explain the difference between strcpy() and memcpy() function?

0 Answers  


how can i get the output 54321 4321 321 21 1 in c programming........???? pls help......

10 Answers   Infosys,


Categories