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 |
Function shall sum members of given one-dimensional array. However, it should sum only members whose number of ones in the binary representation is higher than defined threshold (e.g. if the threshold is 4, number 255 will be counted and 15 will not) - The array length is arbitrary - output the results to the stdout
What is the relation between # and include<stdio.h>
Explain how do you determine a file’s attributes?
Where define directive used?
what is the difference between auto and static keywords
1 Answers cDot, College School Exams Tests, TCS,
how many times of error occur in C
find second largest element in array w/o using sorting techniques? use onle one for loop.
15 Answers BitWise, Zycus Infotech,
Can you please explain the difference between exit() and _exit() function?
What is a nested loop?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
What's the best way of making my program efficient?
What is the importance of c in your views?