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

Who is the main contributor in designing the c language after dennis ritchie?

0 Answers  


What are the main characteristics of c language describe the structure of ac program?

0 Answers  


Write a program to find the given number is odd or even without using any loops(if,for,do,while)

4 Answers   CNC, Gokul,


Here is a neat trick for checking whether two strings are equal

0 Answers  


who is the founder of c

19 Answers   College School Exams Tests, HP,






Is fortran still used in 2018?

0 Answers  


Is null valid for pointers to functions?

0 Answers  


How do you use a pointer to a function?

0 Answers  


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} what would be the output?

1 Answers   Wipro,


What is variables in c?

0 Answers  


#include<stdio.h> #include<conio.h> void main() {clrscr(); char another='y'; int num; for(;another=='y';) { printf("Enter a number"); scanf("%d",&num); printf("squre of %d is %d",num,num*num); printf("\nwant to enter another number y/n"); scanf("%c",&another); } getch(); } the above code runs only one time.on entering 'y' the screen disappeares.what can i do?

3 Answers  


f1() { f(3);} f(int t) { switch(t); { case 2: c=3; case 3: c=4; case 4: c=5; case 5: c=6; default: c=0;} value of c?

5 Answers   Geometric Software,


Categories