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
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
What is the collection of communication lines and routers called?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
What is a static variable in c?
Explain what is page thrashing?
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
Are c and c++ the same?
What does the format %10.2 mean when included in a printf statement?
Write a progarm to find the length of string using switch case?
Write a program to print "hello world" without using a semicolon?
What is an endless loop?
State two uses of pointers in C?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
Explain the use of keyword 'register' with respect to variables.
main() { printf("hello"); fork(); }