What is the real time usage volatile?
Answers were Sorted based on User's Feedback
Answer / stylish_312
volatile int i=10;
main()
{
fun()
{
while(i==10)
{
...
}
printf("This will print..\n");
}
}
ANS:
if we are not using volatile int ,the loop will be keep on
exeecuting,so printf statement will not print...to break
this loop declare the variable as a volatile....
| Is This Answer Correct ? | 8 Yes | 2 No |
What is output redirection?
Suppose I want to write a function that takes a generic pointer as an argument and I want to simulate passing it by reference. Can I give the formal parameter type void **, and do something like this? void f(void **); double *dp; f((void **)&dp);
What does %f mean c?
program to find the ASCII value of a number
What are .h files and what should I put in them?
main() { int i; printf("%d", &i)+1; scanf("%d", i)-1; }
How to set a variable in the environment list?
write a progrmm in c language take user interface generate table using for loop?
which is the best site or book for learning C...and i need the content for C..how to get the good programming skills....? can plz suggest me....
When should volatile modifier be used?
What is the most efficient way to count the number of bits which are set in an integer?
Describe explain how arrays can be passed to a user defined function