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 |
please give me some tips for the selection in TCS.
Is there a built-in function in C that can be used for sorting data?
what do you mean by enumeration constant?
Is main() function predfined or userdefined?
what is the use of fflush() function?
identify the in correct expression a.a=b=3=4; b.a=b=c=d=0; float a=int b=3.5; d.int a; float b; a=b=3.5;
palindrome for strings and numbers----Can anybody do the prog?
6 Answers CTS, TCS, Vipro Lifescience Pvt,
what are the uses of structure?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
What are enums in c?
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
I have an array of 100 elements, each of which is a random integer. I want to know which of the elements: a) are multiples of 2 b) are multiples of 2 AND 5 c) have a remainder of 3 when divided by 7