Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 Help Members By Posting Answers For Below Questions

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

1773


What is the collection of communication lines and routers called?

1120


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

1101


What is a static variable in c?

1121


Explain what is page thrashing?

1099


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4285


Are c and c++ the same?

1057


What does the format %10.2 mean when included in a printf statement?

1653


Write a progarm to find the length of string using switch case?

2067


Write a program to print "hello world" without using a semicolon?

1061


What is an endless loop?

1274


State two uses of pointers in C?

1057


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

1019


Explain the use of keyword 'register' with respect to variables.

1043


main() { printf("hello"); fork(); }

1194