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 |
What is the OOPs concept?
write a program for the normal snake games find in most of the mobiles.
C program to find frequency of each character in a text file?
convert 0.9375 to binary
what will be maximum number of comparisons when number of elements are given?
When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?
write a program to concatenation the string using switch case?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
There is a mobile keypad with numbers 0-9 and alphabets on it. take input of 7 keys and then form a word from the alphabets present on those keys.
#include<stdio.h> main() { char *p1; char *p2; p1=(char *) malloc(25); p2=(char *) malloc(25); strcpy(p1,"Ramco"); strcpy(p2,"Systems"); strcat(p1,p2); printf("%s",p1); } Tell me the output?
Explain what is the benefit of using #define to declare a constant?
difference between object file and executable file