what is the use of keyword volatile??
Answers were Sorted based on User's Feedback
Answer / kishor narayan
Volatile qualifier indicates to the compiler that the
variable can be modified at any stage of the program
execution. This can happen even if the region of code being
executed might not have any access to the variable in
question. In that sense, Volatile qualifier does the
opposite of the Const qualifier.
@Vignesh1988i -> Volatile qualifier does not assign any
garbage value to the variable.
Is This Answer Correct ? | 15 Yes | 0 No |
Answer / kala
it is the variable which can be modified outside of the
program. i.e hardwares can modify this variable. To avoid
compiler optimization we can use volatile.
this is used for memory mapped hardware and shared memory
usuage.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / pur
if you use volatile variables then code optimization will
not happen at compilation time, so .o size will be more.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / vignesh1988i
volatile keyword is a one in which assigns some garbage
value to the variables declared with this keyword..........
before assigning some values by the user to the variables.
Is This Answer Correct ? | 4 Yes | 10 No |
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
void main() { for(; 0 ;) ... { printf("hello"); ... } getch(); }
What is realloc in c?
What is size of union in c?
Why can’t we compare structures?
a program that can input number of records and can view it again the record
Can you please explain the scope of static variables?
What is typedf?
4)What would be the output? main() { int num=425; pf("%d",pf("%d",num)); } a)Comp error b)4425 c)4253 d)3435 e)none
main() { int x, arr[8]={11,22,33,44,55,66,77,88}; x=(arr+2)[3]; printf(ā%dā,x); }
How will you write a code for accessing the length of an array without assigning it to another variable?