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 |
What is d scanf?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
Can you please compare array with pointer?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
What are the average number of comparisons required to sort 3 elements?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
In which mode we open the file for read,write and append also in c ? a)W b)w+ c)r+ d)a
What are the different file extensions involved when programming in C?
CopyBits(x,p,n,y) copy n LSBs from y to x starting LSB at 'p'th position.
How to compare array with pointer in c?
program to find the roots of a quardratic equation
Go through this linked list concept.While traversing through the singly linked list sometimes the following code snippet "while(head != NULL)" is used and other times "while(head->link != NULL)"is used(Here head is the pointer pointing to the first node,node has two parts data part and link part).What is the difference between head != NULL and Head->link != NULL and in which situation are they used?