what is volatile in c language?
Answer Posted / selvakumar vedhachalam
It is nothing but telling to compiler that this variable
will change its value at anytime by means of anything and
compiler should not make any assumption about this variable.
Normally compiler will assume that some variable will be
constant during runtime. This may lead error in checking a
registor value repeatedly. Because the register value may
be changed by anything. So for these kind of variables
should be declared 'volatile' and it be checked each time
appears in the code with out any assumption.
| Is This Answer Correct ? | 135 Yes | 11 No |
Post New Answer View All Answers
how to make a scientific calculater ?
What are the types of unary operators?
What happens if you free a pointer twice?
How do shell structures work?
What is pre-emptive data structure and explain it with example?
Why malloc is faster than calloc?
How can you find the exact size of a data type in c?
What is extern keyword in c?
Explain the difference between malloc() and calloc() in c?
How do you view the path?
What is the difference between functions getch() and getche()?
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
What are the types of macro formats?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.