Assuming int variable x comment whether the condition is cor

Assuming int variable x, comment whether the condition is correctly coded in C? if(-1

Solution

21 Ans)

int min(int a, int b)

{

   int c;

   c= a<b?1:0;

if(c==1)

{

   return (a);

}

else

{

return(b)

}

}

------------------------------------------

only 1 question per post will be answered please

 Assuming int variable x, comment whether the condition is correctly coded in C? if(-1 Solution21 Ans) int min(int a, int b) { int c; c= a<b?1:0; if(c==1) {

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site