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 type is sizeof?
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What is an identifier?
Write a function that will take in a phone number and output all possible alphabetical combinations
Write a program to swap two numbers without using a temporary variable?
What is class and object in c?
How is actual parameter different from the formal parameter?
What are dangling pointers in c?
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
I need previous papers of CSC.......plz help out by posting them.......
Why do we use header files in c?
how to execute a program using if else condition and the output should enter number and the number is odd only...
What is volatile c?
What are nested functions in c?
How to set file pointer to beginning c?