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 a const pointer in c?
What is typedef example?
When can you use a pointer with a function?
Explain the difference between #include "..." And #include <...> In c?
Explain how are portions of a program disabled in demo versions?
Why can’t constant values be used to define an array’s initial size?
What is the use of a static variable in c?
Hi can anyone tell what is a start up code?
What is the difference between malloc() and calloc()?
I need testPalindrome and removeSpace
#include
What is an arrays?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What is a void pointer in c?
Can 'this' pointer by used in the constructor?