what is volatile in c language?
Answer Posted / selvakumar vedhachalam
It is nothing but telling to compiler that this variable
will change its value at anytime by means of anything and
compiler should not make any assumption about this variable.
Normally compiler will assume that some variable will be
constant during runtime. This may lead error in checking a
registor value repeatedly. Because the register value may
be changed by anything. So for these kind of variables
should be declared 'volatile' and it be checked each time
appears in the code with out any assumption.
Is This Answer Correct ? | 135 Yes | 11 No |
Post New Answer View All Answers
What is string constants?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
a value that does not change during program execution a) variabe b) argument c) parameter d) none
What the advantages of using Unions?
Tell me the use of bit field in c language?
Do character constants represent numerical values?
What does the c preprocessor do?
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.
Why is void main used?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
What is the benefit of using #define to declare a constant?
Write a program with dynamically allocation of variable.
Do array subscripts always start with zero?