What are volatile variables?

Answer Posted / manoj

Volatile variable will be used when we are dealing with
external memory, external device and interrupt service
routine. In these situation if some variable needs update
or gets update without user knowledge in that case variable
should be declared as VOLATILE. otherwise we may loose
these update.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above

754


#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }

783


What’s a signal? Explain what do I use signals for?

607


What is data type long in c?

625


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

662






What is the sizeof () operator?

624


What is scope rule in c?

606


What is the difference between text files and binary files?

678


What is the use of #define preprocessor in c?

618


In C programming, how do you insert quote characters (‘ and “) into the output screen?

895


What is a protocol in c?

559


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

654


Explain the use of bit fieild.

715


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

594


What is #define used for in c?

615