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 ?    12 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

print pattern 1 1 33 33 555 555 77777777 555 555 33 33 1 1

1 Answers   Winit,


can any one provide me the notes of data structure for ignou cs-62 paper

0 Answers   Ignou,


Can a program have two main functions?

0 Answers  


Is c dynamically typed?

0 Answers  


write a program of bubble sort using pointer?

3 Answers   TCS,






15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?

1 Answers  


Can a binary search tree be used as an index? If yes, how? Explain

0 Answers   TCS,


What is keyword in c?

0 Answers  


How we can insert comments in a c program?

0 Answers  


What is the use of getch ()?

0 Answers  


What is a pointer and how it is initialized?

0 Answers  


How to access or modify the const variable in c ?

16 Answers   HCL, HP,


Categories