6") : puts("<=6"); } Here output would give you "> 6". The reason f..." /> Explain Operations Involving Unsigned And Signed? Unsigned Will Be Converted To Signed? 6") : puts("<=6"); } Here output would give you "> 6". The reason f..." /> 6") : puts("<=6"); } Here output would give you "> 6". The reason f..." />
Answers

Question and Answer:

  Home  Embedded System

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

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

 218 views

More Questions for you: