what is the use of keyword volatile??
Answers were Sorted based on User's Feedback
Answer / kishor narayan
Volatile qualifier indicates to the compiler that the
variable can be modified at any stage of the program
execution. This can happen even if the region of code being
executed might not have any access to the variable in
question. In that sense, Volatile qualifier does the
opposite of the Const qualifier.
@Vignesh1988i -> Volatile qualifier does not assign any
garbage value to the variable.
| Is This Answer Correct ? | 15 Yes | 0 No |
Answer / kala
it is the variable which can be modified outside of the
program. i.e hardwares can modify this variable. To avoid
compiler optimization we can use volatile.
this is used for memory mapped hardware and shared memory
usuage.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / pur
if you use volatile variables then code optimization will
not happen at compilation time, so .o size will be more.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / vignesh1988i
volatile keyword is a one in which assigns some garbage
value to the variables declared with this keyword..........
before assigning some values by the user to the variables.
| Is This Answer Correct ? | 4 Yes | 10 No |
I have a varargs function which accepts a float parameter?
Can we declare a function inside a function in c?
what is meant by flushll() in c programming?
What is the symbol indicated the c-preprocessor?
input may any number except 1,output will always 1.. conditions only one variable should be declare,don't use operators,expressions,array,structure
How many types of linked lists what are they? How many types of data structures?
18 Answers BSNL, Pivotal Software,
How do we print only part of a string in c?
How we can set and clear bit in a byte using macro function?
What is header file in c?
matrix multiplication fails introspect the causes for its failure and write down the possible reasons for its failurein c language.
What is extern c used for?
define switch statement?