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 |
What is the function of dma controlled in embedded system?
What is an embedded system?
Explain the difference between testing and verification?
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
What do you do to stay abreast of the latest technologies and tools?
Explain the concept of separation of concerns and it's pros and cons.
Tell me what is top half & bottom half of a kernel?
Is tasklets or workqueues or softirqs are scheduled by the scheduler?
What are the languages used in embedded system?
What is the order of calling for the constructors and destructors in case of objects of inherited classes?
Why does pre-emptive multi-threading used to solve the central controller problem?
How many types of ipc mechanism you know?