what is the difference between const volatile int i
& volatile const int j;
Answers were Sorted based on User's Feedback
Answer / suman ranjan
There is no difference between the two. The important thing
to note is what does this mean anyways.
The const type qualifier declares an object to be
nonmodifiable. The volatile type qualifier declares an item
whose value can legitimately be changed by something beyond
the control of the program in which it appears, such as a
concurrently executing thread.
An item can be both const and volatile, in which case the
item could not be legitimately modified by its own program,
but could be modified by some asynchronous process.
| Is This Answer Correct ? | 25 Yes | 1 No |
Answer / raj
There is no difference between const volatile int i and
volatile const int j
| Is This Answer Correct ? | 13 Yes | 10 No |
char ch="{'H','I',0};printf("%s",ch);what is output
Find the O/p of the following 1) #include int main() { char c='1'; int j=atoi(c); }
consider the following C code main() { int i=3,x; while(i>0) { x=func(i); i--; } int func(int n) { static sum=0; sum=sum+n; return(sum); } the final value of x is
Is there a way to switch on strings?
how do we remove the printed character in printf statement and write next it it
diff .between strcture and union
What is c++ used for today?
What's wrong with "char *p = malloc(10);" ?
How do you write a program which produces its own source code as its output?
write a program to display all prime numbers
Why should I use standard library functions instead of writing my own?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]