What are volatile variables?



What are volatile variables?..

Answer / manoj

Volatile variable will be used when we are dealing with
external memory, external device and interrupt service
routine. In these situation if some variable needs update
or gets update without user knowledge in that case variable
should be declared as VOLATILE. otherwise we may loose
these update.

Is This Answer Correct ?    8 Yes 1 No

Post New Answer

More C Interview Questions

What is Full Form of C and Why We use C

23 Answers  


what is const volatile?

2 Answers  


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

0 Answers  


When should volatile modifier be used?

0 Answers  


What is cohesion and coupling in c?

0 Answers  






Write a program to generate prime factors of a given integer?

2 Answers  


what is a stack

3 Answers  


What is the use of ?: Operator?

0 Answers  


Which of the Following will define a type NODE that is a node in a Linked list? A)struct node {NODE*next;int x;};type def struct node NODE; B)typedef struct NODE {struct NODE *next;int x;}; C)typedef struct NODE {NODE *next;int x;}; D)typedef struct {NODE *next;int x;}NODE;

5 Answers   Accenture, TCS,


a character variable can at a time store a) 1 character b) 8 characters c) 254 characters d) none of the above

3 Answers  


in malloc and calloc which one is fast and why?

1 Answers  


Difference between linking and loading?

0 Answers  


Categories