Answers for "What does x = (a<b)? A:b mean in C programming?"

C
0

What does x = (a<b)? A:b mean in C programming?

x = (a < b)? a : b; 
// This is equivalent to the code:

if (a < b){
  x = a; // true
}else{
  x = b; // false
}
Posted by: Guest on April-29-2022

Code answers related to "C"

Browse Popular Code Answers by Language