What is volatile

Answer Posted / ravi.jnv

Volatile is to inform the compiler that not to optimise
code.
for ex:
int a = port1;
int b = port1;
int c = port1;

compiler may convert it as
int a=b=c=port1;

so avoid it , u have to use volatile keyword.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where local variables are stored in c?

554


How do I read the arrow keys? What about function keys?

610


how can use subset in c program and give more example

1494


What is bss in c?

596


Does * p ++ increment p or what it points to?

610






Is stack a keyword in c?

632


What is pointer to pointer in c with example?

544


Create a simple code fragment that will swap the values of two variables num1 and num2.

802


What is ctrl c called?

588


What are the types of type qualifiers in c?

645


How many types of sorting are there in c?

604


Should I learn data structures in c or python?

576


When should I declare a function?

621


What are comments and how do you insert it in a C program?

737


What is the main difference between calloc () and malloc ()?

568