what is the use of keyword volatile??

Answers were Sorted based on User's Feedback



what is the use of keyword volatile??..

Answer / kishor narayan

Volatile qualifier indicates to the compiler that the
variable can be modified at any stage of the program
execution. This can happen even if the region of code being
executed might not have any access to the variable in
question. In that sense, Volatile qualifier does the
opposite of the Const qualifier.
@Vignesh1988i -> Volatile qualifier does not assign any
garbage value to the variable.

Is This Answer Correct ?    15 Yes 0 No

what is the use of keyword volatile??..

Answer / kala

it is the variable which can be modified outside of the
program. i.e hardwares can modify this variable. To avoid
compiler optimization we can use volatile.
this is used for memory mapped hardware and shared memory
usuage.

Is This Answer Correct ?    4 Yes 0 No

what is the use of keyword volatile??..

Answer / pur

if you use volatile variables then code optimization will
not happen at compilation time, so .o size will be more.

Is This Answer Correct ?    2 Yes 0 No

what is the use of keyword volatile??..

Answer / vignesh1988i

volatile keyword is a one in which assigns some garbage
value to the variables declared with this keyword..........
before assigning some values by the user to the variables.

Is This Answer Correct ?    4 Yes 10 No

Post New Answer

More C Interview Questions

An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array

0 Answers  


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

0 Answers  


void main() { for(; 0 ;) ... { printf("hello"); ... } getch(); }

1 Answers  


What is realloc in c?

0 Answers  


What is size of union in c?

0 Answers  






Why can’t we compare structures?

0 Answers  


a program that can input number of records and can view it again the record

0 Answers   Accenture,


Can you please explain the scope of static variables?

0 Answers  


What is typedf?

0 Answers  


4)What would be the output? main() { int num=425; pf("%d",pf("%d",num)); } a)Comp error b)4425 c)4253 d)3435 e)none

10 Answers  


main() { int x, arr[8]={11,22,33,44,55,66,77,88}; x=(arr+2)[3]; printf(ā€œ%dā€,x); }

8 Answers   Vector,


How will you write a code for accessing the length of an array without assigning it to another variable?

0 Answers  


Categories