where do we use volatile keyword?

Answer Posted / achal ubbott

the keyword volatile is more used in embedded systems
programming, especially when we are dealing with the
special function registers of a microcontroller. e.g.
status register of UART or some other peripheral devices.
As you may know that volatile asks the compiler not to
subject the variable in question to optimization.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Sir i need notes for structure,functions,pointers in c language can you help me please

1953


How can you invoke another program from within a C program?

620


What is the difference between union and anonymous union?

841


What does c mean?

594


Can we change the value of #define in c?

588






What language is lisp written in?

627


Is void a keyword in c?

584


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

706


What are identifiers c?

569


How can type-insensitive macros be created?

707


Why is c still so popular?

620


What is volatile c?

529


When should I declare a function?

629


What are valid signatures for the Main function?

705


Write a program to find factorial of a number using recursive function.

651