Embedded System Question:

Download Job Interview Questions and Answers PDF

Explain Operations involving unsigned and signed? unsigned will be converted to signed?

Embedded System Interview Question
Embedded System Interview Question

Answer:

yes,

void foo(void)
{
unsigned int a = 6;
int b = -20;
(a+b > 6) ? puts("> 6") :
puts("<=6");
}

Here output would give you "> 6". The reason for this is that expressions involving signed and unsigned types have all operands
promoted to unsigned types

Download Embedded System Interview Questions And Answers PDF

Previous QuestionNext Question
Explain What happens when recursion functions are declared inline?Explain Order of constructor and destructor call in case of multiple inheritance?