look at following code
void foo(void) {
unsigned int a = 6;
int b = -20;
int c = (a+b > 6) ? 1:0;
}
o/p is 1 why
explain promotion rules
Answer / nitin sharma
Compiler will convert variable b to unsigned int b and then do the addition. Which will be greater than 6 and you got 1.
| Is This Answer Correct ? | 38 Yes | 2 No |
How does the interrupt architecture works?
can please tel me faq's asking in interviews on microcontrollers
Describe to me some bad code you've read or inherited lately.
What is the significance of watchdog timer in embedded systems?
What is the significance of watchdog timer in es?
Tell me what is top half & bottom half of a kernel?
Explain how does combination of functions reduce memory requirements in embedded systems?
What is the difference between asynchrony and concurrency?
Explain the concept of separation of concerns?
What are the components of embedded system?
Explain the difference between "set" logic, and "procedural" logic. When would you use each one and why?
Tell me what is interrupt latency? How can you reduce it?