What is an volatile variable?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
volatile variable is that which we can't change during
program execution tome
Is This Answer Correct ? | 2 Yes | 35 No |
If you know then define #pragma?
What is the maximum length of an identifier?
int main(){ float f=8.0; if(f==8.0) printf("good"); else printf("bad"); } what is the answere and explain it?
What is calloc in c?
inline function is there in c language?
What is the mean of this statement:: if(int i=0 * i=9)
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?
List some basic data types in c?
nic scientist exam
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?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
Why main function is special give two reasons?