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

why do we use pointer instead directly acessing the data?

2 Answers  


code for bubble sort?

1 Answers  


how to print 2-D array using a single for loop?

2 Answers   Mind Tree, TCS, Value Labs,


Read N characters in to an array . Use functions to do all problems and pass the address of array to function. 1. Print only the alphabets . If in upper case print in lower case vice versa.

1 Answers  


what is data structure?

5 Answers   CBSE,






Input is "Jack and jill went up a hill" To print output is 1-letter word(s)-1 2-letter words-1 3-letter words-1 4-letter words-4

1 Answers   TCS, Mind Tree,


what are the stages of compilation

1 Answers   Bosch,


what is the associativity of bitwise OR operator?

1 Answers  


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

0 Answers   TCS,


what is diference between return 0 and return NULL??

3 Answers  


WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

0 Answers  


if the address of a[1,1] and a[2,1] are 1000 and 1010 respectively and each occupies 2 bytes then the array has been stored in what order?

3 Answers  






Categories