what is volatile in c language?

Answer Posted / s.m.faisal

volatile reduces the optimization .optimization means compiler should not make out that the variable has not changed its value so it reads the value directly from the register.
So while using volatile keyword compiler will directly access the variable from the memory not from the register bcz the value of the variable can be changed outside or inside the program.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I rethow can I return a sequence of random numbers which dont repeat at all?

696


What are data types in c language?

578


What do you understand by normalization of pointers?

614


Who invented b language?

903


What are the types of type specifiers?

615






List the different types of c tokens?

609


What is void pointers in c?

577


What is the heap?

675


What is the auto keyword good for?

614


Explain the properties of union. What is the size of a union variable

710


What is a macro in c preprocessor?

616


please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

1535


write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

1832


What is conio h in c?

611


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

667