What does volatile do?



What does volatile do?..

Answer / Mahesh Chauhan

The volatile modifier in C programming language informs 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

How can we allocate array or structure bigger than 64kb?

2 Answers   CSC,


What is the use of static variable in c?

1 Answers  


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1 Answers  


what is software?

7 Answers   Wipro,


find the output of the following program main() { int x=5, *p; p=&x; printf("%d",++*p); }

10 Answers   Amdocs, TCS,


What is an arrays?

1 Answers  


why we use pointer in c

7 Answers   HCL, TCS,


When should volatile modifier be used?

1 Answers  


What are lookup tables in c?

1 Answers  


where does it flourished?

0 Answers   Microsoft,


Write a progarm to find the length of string using switch case?

1 Answers   TCS,


what will be the out put. #include<stdio.h> void main() { printf("Output:"); printf(1+"vikashpatel"); }//output: ikashpatel

1 Answers   V2 Solutions,


Categories