where do we use volatile keyword?



where do we use volatile keyword?..

Answer / rekha_sri

* A variable should be declared volatile whenever its value
could change unexpectedly.

* A volatile qualifier must be used when reading the contents
of a memory location whose value can change unknown to the
current program.

* A volatile qualifier must be used for shared data modified
in signal handlers or interrupt service routines.

Is This Answer Correct ?    9 Yes 0 No

Post New Answer

More C Interview Questions

what is a NULL Pointer? Whether it is same as an uninitialized pointer?

0 Answers   TISL,


code for bubble sort?

1 Answers  


What happens if a header file is included twice?

0 Answers  


What is LINKED LIST? How can you access the last element in a linked list?

0 Answers   ADP,


name the language for writing c compiler?

3 Answers   Microsoft,






What is use of bit field?

0 Answers  


Write a program to reverse a given number in c language?

0 Answers  


What is a pointer value and address in c?

0 Answers  


How can I find out how much free space is available on disk?

0 Answers  


Describe newline escape sequence with a sample program?

0 Answers  


Struct(s) { int a; long b; } Union (u) {int a; long b; } Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4

2 Answers   Mascot,


#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

0 Answers   Wilco,


Categories