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 are linker error?
what are you see during placement time in the student.
0 Answers Goldman Sachs, TCS, Tech Solutions,
char ch=10;printf("%d",ch);what is the output
Differentiate between ordinary variable and pointer in c.
What is double pointer in c?
Can two or more operators such as and be combined in a single line of program code?
sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2; Find the value of x?
How is a two dimensional array passed to function when the order of matrix is not known at complie time?
Can you pass an entire structure to functions?
write a program to generate 1st n fibonacci prime number
what is the maximum limit of row and column of a matrix in c programming. in linux .
What is zero based addressing?