what is the use of keyword volatile??

Answers were Sorted based on User's Feedback



what is the use of keyword volatile??..

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

what is the use of keyword volatile??..

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

what is the use of keyword volatile??..

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

what is the use of keyword volatile??..

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

Post New Answer

More C Interview Questions

What is nested structure in c?

0 Answers  


Explain what happens if you free a pointer twice?

0 Answers  


Write the following function in C. stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

4 Answers   OpenFeel,


What is wrong with this program statement?

0 Answers  


who developed c and why he developed c?

5 Answers  






my name is nani i completed my b-tech in hyd now i want go for interveiw but i dont know the process of software field interveiws plz help me anyone how many rouds there n what rounds plz plz plz help me n where i can get these details

2 Answers  


WHAT IS ABSTRACT DATA TYPE

4 Answers   Wipro,


Are the variables argc and argv are local to main?

0 Answers   TISL,


How do you generate random numbers in C?

0 Answers  


What do you mean by a local block?

0 Answers   InterGraph,


What is the difference between pure virtual function and virtual function?

0 Answers  


Is null a keyword in c?

0 Answers  


Categories