Q. where is the below variables stored ?
- volatile, static, register
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
print pattern 1 1 33 33 555 555 77777777 555 555 33 33 1 1
can any one provide me the notes of data structure for ignou cs-62 paper
Can a program have two main functions?
Is c dynamically typed?
write a program of bubble sort using pointer?
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?
Can a binary search tree be used as an index? If yes, how? Explain
What is keyword in c?
How we can insert comments in a c program?
What is the use of getch ()?
What is a pointer and how it is initialized?
How to access or modify the const variable in c ?
16 Answers HCL, HP,