What is volatile
Answers were Sorted based on User's Feedback
Answer / ravi.jnv
Volatile is to inform the compiler that not to optimise
code.
for ex:
int a = port1;
int b = port1;
int c = port1;
compiler may convert it as
int a=b=c=port1;
so avoid it , u have to use volatile keyword.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / nikhil
Basically, it is a type qualifier.
a volatile data type is used at optimizer level.
Generally, in the embedded coding, When the optimizer is Set
on "favor size". The data type declaration as volatile
declares to compiler that the value of this data type can
change beyond the program flow(like interrupts.
Otherwise if the optimizer is enable, the program malfunctions.
| Is This Answer Correct ? | 1 Yes | 1 No |
What does typeof return in c?
How can I swap two values without using a temporary?
void main(int argc,char *argv[],char *env[]) { int i; for(i=1;i<argc;i++) printf("%s",env[i]); }
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
Explain why c is faster than c++?
What is the difference between exit() and _exit() function in c?
What are # preprocessor operator in c?
write a progam to compare the string using switch case?
write the program for prime numbers?
73 Answers Accenture, Aptech, Infosys, TCS,
explain what is a newline escape sequence?
What does the message "automatic aggregate intialization is an ansi feature" mean?
What are local variables c?