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

Write the Program to reverse a string using pointers.

0 Answers   InterGraph,


I have a varargs function which accepts a float parameter?

0 Answers  


given the piece of code int a[50]; int *pa; pa=a; to access the 6th element of the array which of the following is incorrect? a.*(a+5) b.a[5] c.pa[5] d.*(*pa + 5)

6 Answers   amu, TCS,


Can you add pointers together? Why would you?

0 Answers  


1. Write a C program to count the number of occurrence of a specific word in the given strings. (for e.g. Find how many times the word “live” comes in the sentence “Dream as if you’ll live forever, live as if you’ll die today ”)

12 Answers   Eskom, TCS,






write a c/c++ program that takes a 5 digit number and calculates 2 power that number and prints it?

4 Answers  


There seem to be a few missing operators ..

0 Answers  


do u print this format '(((())))'. This brackets is based on user input like 4 or 5 or 6,without using any loop's?

1 Answers   Oracle,


write a program to generate 1st n fibonacci prime number

12 Answers  


What is string function c?

0 Answers  


provide an example of the Group by clause, when would you use this clause

0 Answers  


How can I read a directory in a c program?

1 Answers   CSC,


Categories