Question: Why does the below C code always return 2? Explain. int compare(unsigned int x){ return (x > -1) ? 1 : 2 ; }
Why does the below C code always return 2? Explain.
int compare(unsigned int x){
return (x > -1) ? 1 : 2 ;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
