What is an volatile variable?

Answers were Sorted based on User's Feedback



What is an volatile variable?..

Answer / shruti

okies..
I really had no idea about this concept..

Can neone plz tell me how do we declare, such volatile
varibales??

Thanks..

Is This Answer Correct ?    2 Yes 3 No

What is an volatile variable?..

Answer / harish

volatile variable tells the compiler not to optimize the
code at run time.
example:
volatile int a = 20; // variable a is declared as volatile.
For more information check this out...

http://www.programmersheaven.com/articles/pathak/article1.htm

Is This Answer Correct ?    5 Yes 8 No

What is an volatile variable?..

Answer / manish

as on compiler optimize the code. and it take the variable
first in cache and then in resisters.
so in volatile variables what the value is stored at first
time it will be stored in resister but when u want to
change the values of that volatiles variables.it will not
change.

Is This Answer Correct ?    3 Yes 6 No

What is an volatile variable?..

Answer / santhi

the variable which can be modified.

Is This Answer Correct ?    24 Yes 33 No

What is an volatile variable?..

Answer / mahendra giri

volatile variable is that which we can't change during
program execution tome

Is This Answer Correct ?    2 Yes 35 No

Post New Answer

More C Interview Questions

If you know then define #pragma?

0 Answers  


What is the maximum length of an identifier?

0 Answers  


int main(){ float f=8.0; if(f==8.0) printf("good"); else printf("bad"); } what is the answere and explain it?

3 Answers  


What is calloc in c?

0 Answers  


inline function is there in c language?

4 Answers  






What is the mean of this statement:: if(int i=0 * i=9)

2 Answers   HCL,


can any one tell that i have a variable which is declared as static but i want this variable to be visible to the other files? how?

2 Answers  


List some basic data types in c?

0 Answers  


nic scientist exam

1 Answers   NIC,


typedef struct { int i:8; char c:9; float f:20; }st_temp; int getdata(st_temp *stptr) { stptr->i = 99; return stptr->i; } main() { st_temp local; int i; local.c = 'v'; local.i = 9; local.f = 23.65; printf(" %d %c %f",local.i,local.c,local.f); i = getdata(&local); printf("\n %d",i); getch(); } why there there is an error during compiling the above program?

1 Answers  


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

0 Answers  


Why main function is special give two reasons?

0 Answers  


Categories