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 |
Explain 'far' and 'near' pointers in c.
main() { int a=5; printf(?%d,%d,%d\n?,a,a< <2,a>>2); } Answer: 5,20,1 please explain this code in detail
What do you mean by dynamic memory allocation in c?
can any one tell that i have a variable which is declared as static but i want this variable to be visible to the other files? how?
What is the difference between char array and char pointer?
Meaning of () in c
How can you allocate arrays or structures bigger than 64K?
What is the difference between if else and switchstatement
print 1-50 with two loop & two print Statement
Is that possible to add pointers to each other?
When can you use a pointer with a function?
Write an implementation of “float stringToFloat(char *str).” The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). • Assumptions • Don’t worry about overflow or underflow • Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 • Don’t worry about exponential (e.g. 1e10), instead you should treat ‘e’ as an invalid character • Write it like real code, e.g. do error checking • Go though the string only once • Examples • “1.23” should return 1.23 • “1a” should return 1 • “a”should return 0