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...

how the compiler treats any volatile variable?Explain with
example.

Answer Posted / daniboy

A volatile variable is one whose VALUE CAN CHANGE
UNEXPECTEDLY. Consequently, the compiler can make NO
ASSUMPTIONS about the value of the variable. In
particular, the optimizer must be careful to RELOAD the
variable every time it is used instead of holding a copy in
a register.
Examples of volatile variables are:

(a) Hardware registers in peripherals (e.g., status
registers)
(b) Non-stack variables referenced within an interrupt
service routine.
(c) Variables shared by multiple tasks in a multi-
threaded application.

Source: 10 Best Questions to would-be Embedded Programmers -
By Nigel Johns

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

2230


Is python a c language?

945


Why main function is special give two reasons?

1478


Explain how can you be sure that a program follows the ansi c standard?

1393


Write a function that will take in a phone number and output all possible alphabetical combinations

997


What will be your course of action for a push operation?

1046


Explain what are the standard predefined macros?

1068


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

3912


What are the general description for loop statement and available loop types in c?

1066


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

993


Write a program to show the change in position of a cursor using c

993


Explain what are multidimensional arrays?

1008


The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?

1139


Difference between pass by reference and pass by value?

1094


What is hungarian notation? Is it worthwhile?

1165