Can a variable be both const and volatile?
Answer / Ashish Kumar Tiwari
In C, it is not possible for a variable to be both 'const' and 'volatile'. The 'const' qualifier specifies that the value of an object should not be modified, while the 'volatile' qualifier indicates that the value of an object may be modified by means outside the program's control. Combining these two qualifiers would lead to a semantic ambiguity because if a volatile const were modifiable, it would not be constant and if it were not modifiable, it would not be volatile.
| Is This Answer Correct ? | 0 Yes | 0 No |
Determine the code below, tell me exactly how many times is the operation sum++ performed ? for ( i = 0; i < 100; i++ ) for ( j = 100; j > 100 - i; j--) sum++;
What does the error message "DGROUP exceeds 64K" mean?
which of 'arrays' or 'pointers' are faster?
what is different between auto and local static? why should we use local static?
A C E G H +B D F A I ------------ E F G H D
Write a program of prime number using recursion.
void main() { //char ch; unsigned char ch; clrscr(); for(ch =0;ch<= 127; ch++) printf(" %c= %d \t ", ch, ch); } output?
Do pointers need to be initialized?
1.what are local and global variables? 2.what is the scope of static variables? 3.what is the difference between static and global variables? 4.what are volatile variables? 5.what is the use of 'auto' keyword? 6.how do we make a global variable accessible across files? Explain the extern keyword? 7.what is a function prototype? 8.what does keyword 'extern' mean in a function declaration?
What is function and its example?
program to locate string with in a string with using strstr function
Can you tell me how to check whether a linked list is circular?