Q. where is the below variables stored ?
- volatile, static, register




Answers were Sorted based on User's Feedback



Q. where is the below variables stored ? - volatile, static, register..

Answer / kiruthikau

local variables-->stack
global variable-->data memory
register variable-->CPU registers
static variable-->main memory


Volatile is a type qualifier not a storage class specifier.
So it does not determine storage location.

When we declare a variable as volatile the compiler will
examine the value of the variable each time it is
encountered to see if an external factor has changed the value.

Is This Answer Correct ?    11 Yes 3 No

Q. where is the below variables stored ? - volatile, static, register..

Answer / banavathvishnu

Qualifier Storage
========= ========

1. static Data area

2. register CPU register, if CPU register are
busy with some other work, it will be treated as local and
will be stored on stack

3. Volatile is just a qualifier it does not change the
storage class, if it defined volatile var as global it will
be stored in data area, and if it defined in a funciton it
will be stored in stack.

Is This Answer Correct ?    3 Yes 4 No

Q. where is the below variables stored ? - volatile, static, register..

Answer / c p

local variables-->stack memory
global variable-->global or static memory
register variable-->CPU registers
static variable-->global and static memory
(stack memory+(globel memory or static memory)+heap memory)=DATA MEMORY

Is This Answer Correct ?    0 Yes 3 No



Post New Answer



More C Interview Questions

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

4 Answers  


How can I find out how much memory is available?

1 Answers   Persistent,


Is main() function predfined or userdefined?

11 Answers  


C program code int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15

6 Answers   TCS, Wipro,


please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com

0 Answers  






write a program to remove occurrences the word from entered text?

1 Answers  


Reverse the bit order in a single macro. eg. i/p = 10010101 --> o/p = 10101001

2 Answers  


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

0 Answers  


Hai what is the different types of versions and their differences

0 Answers  


yogesh patil in dell

3 Answers   DELL,


What is your favorite subject?

0 Answers   Invendis,


declare afunction pointer to int printf(char *)?

1 Answers   HCL,






Categories