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
What is binary tree in c?
Can you please explain the scope of static variables?
What is the use of getch ()?
Write a program to print fibonacci series using recursion?
Which control loop is recommended if you have to execute set of statements for fixed number of times?
write a program to print data of 5 five students with structures?
Who invented bcpl language?
Where local variables are stored in c?
Does c have class?
What are the types of macro formats?
can anyone suggest some site name..where i can get some good data structure puzzles???
What’s the special use of UNIONS?
What is the purpose of main() function?
How can I avoid the abort, retry, fail messages?
What is data types?