what is difference b/w extern & volatile variable??
Answer Posted / anonimos
volatile variables are used on RT Embedded systems to
interface a physical memory mapped/IO mapped cell on the
computer board (volatile pointer).
Example define IO port:
#define PortA (*(volatile unsigned char *)0x3b)
unsigned char inputValue=PortA;
optimization may attempt to perform paging to hard drive of
to cache or even CPU registers so when reading from the
physical location in Mem/IO space the program will actually
read old value that was paged/cached by optimization
algorithm of the computer/board, even after the Input
changed on this Memory/IO cell.
volatile instruct the compiler to prevent optimization by
caching to registers/cache.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain logical errors? Compare with syntax errors.
Are there namespaces in c?
What does p mean in physics?
What does s c mean on snapchat?
What is a string?
What is the sizeof () operator?
What are the disadvantages of c language?
Whats s or c mean?
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);
How we can insert comments in a c program?
Why is main function so important?
In c programming language, how many parameters can be passed to a function ?
How can I write functions that take a variable number of arguments?
regarding pointers concept
Not all reserved words are written in lowercase. TRUE or FALSE?