What is the use of volatile?



What is the use of volatile?..

Answer / Kajal Choudhary

The volatile modifier in C programming language is used to inform the compiler that a variable's value may be modified by hardware independent reasons (such as interrupts) and should not optimize accesses to that variable. This ensures that the program always reads the most current value of the variable.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Is stack a keyword in c?

1 Answers  


how to print this pyramid * * * * * * * * * * * * *

2 Answers  


write a program to display the frequency of each element in a given array in c language

1 Answers  


What are dangling pointers?

1 Answers  


What are structure types in C?

1 Answers  


What are control structures? What are the different types?

1 Answers  


In C language, a variable name cannot contain?

1 Answers  


? ???Mirror Mirror on the wall????????

1 Answers   channel V, DPI,


second highest number in a given set of numbers

3 Answers   TCS,


How to swap 3 numbers without using 4th variable?

5 Answers  


Under what circumstances does a name clash occur?

1 Answers   InterGraph,


Can include files be nested?

1 Answers  


Categories