What is the real time usage volatile?

Answer Posted / stylish_312

volatile int i=10;
main()
{
fun()
{
while(i==10)
{
...
}
printf("This will print..\n");
}
}
ANS:
if we are not using volatile int ,the loop will be keep on
exeecuting,so printf statement will not print...to break
this loop declare the variable as a volatile....

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can static variables be declared in a header file?

610


What is identifiers in c with examples?

671


Why c is called a middle level language?

632


How many loops are there in c?

571


What is c value paradox explain?

566






Explain the difference between #include "..." And #include <...> In c?

621


What are qualifiers and modifiers c?

540


What are integer variable, floating-point variable and character variable?

598


What is assignment operator?

620


What should malloc(0) do?

608


Does c have function or method?

583


Whats s or c mean?

589


What is 1d array in c?

595


Why c is called a mid level programming language?

599


What is formal argument?

642