Interviewer And Interviewee Guide

Embedded Systems Interview Question:

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

Submitted by: Administrator
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
Submitted by: Administrator

Read Online Embedded Systems Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.