what is the difference between const volatile int i
& volatile const int j;




Answers were Sorted based on User's Feedback



what is the difference between const volatile int i & volatile const int j;..

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 ?    24 Yes 1 No

what is the difference between const volatile int i & volatile const int j;..

Answer / raj

There is no difference between const volatile int i and
volatile const int j

Is This Answer Correct ?    13 Yes 10 No

Post New Answer




More C Interview Questions

what is the difference between declaration ,defenetion and initialization of a variable?

7 Answers   LG Soft,


how can i get the string which is having two spaces at the end.suppose the string is "Hello World ".Now at the end i have two spaces.i need to print with that spaces .

1 Answers  


I need testPalindrome and removeSpace #include <stdio.h> #define SIZE 256 /* function prototype */ /* test if the chars in the range of [left, right] of array is a palindrome */ int testPalindrome( char array[], int left, int right ); /* remove the space in the src array and copy it over to the "copy" array */ /* set the number of chars in the "copy" array to the location that cnt points t */ void removeSpace(char src[], char copy[], int *cnt); int main( void ) { char c; /* temporarily holds keyboard input */ char string[ SIZE ]; /* original string */ char copy[ SIZE ]; /* copy of string without spaces */ int count = 0; /* length of string */ int copyCount; /* length of copy */ printf( "Enter a sentence:\n" ); /* get sentence to test from user */ while ( ( c = getchar() ) != '\n' && count < SIZE ) { string[ count++ ] = c; } /* end while */ string[ count ] = '\0'; /* terminate string */ /* make a copy of string without spaces */ removeSpace(string, copy, &copyCount); /* print whether or not the sentence is a palindrome */ if ( testPalindrome( copy, 0, copyCount - 1 ) ) { printf( "\"%s\" is a palindrome\n", string ); } /* end if */ else { printf( "\"%s\" is not a palindrome\n", string ); } /* end else */ return 0; /* indicate successful termination */ } /* end main */ void removeSpace(char src[], char copy[], int *cnt) { } int testPalindrome( char array[], int left, int right ) { }

0 Answers  


char ch=10;printf("%d",ch);what is the output

14 Answers   Accenture,


Write a c program to demonstrate character and string constants?

0 Answers  






wat is output of the following int main() { const int j=2; int i; switch(i) { case 1:break; case j:break; default:break; } }

2 Answers  


void main() { int i=5; printf("%d",i+++++i); }

17 Answers   ME,


main() { int i=5; printf("%d%d%d%d",i++,i--,i); }

10 Answers  


HOW DO YOU HANDLE EXCEPTIONS IN C?

2 Answers   AppLabs,


Determine if a number is a power of 2 at O(1).

2 Answers  


Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above

5 Answers   TCS, Accenture,


palindrome for strings and numbers----Can anybody do the prog?

6 Answers   CTS, TCS, Vipro Lifescience Pvt,






Categories