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 |
What is null pointer in c?
Why Modern OS are interrupt driven?Give an example
Is there a way to switch on strings?
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
What is a nested formula?
Can a pointer be static?
what is a c-language.what is do.
Explain why can’t constant values be used to define an array’s initial size?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
Why c language?
the maximum value that an integer constant can have is a) -32767 b) 32767 c) 1.701e+38 d) -1.7014e+38
Stimulate calculator using Switch-case-default statement for two numbers