Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using the tenary operator in C with 3 numbers
#4
I look at it as shorthand...

C=(A>B)?A:B; 

meaning:

If A > B Then C = A Else C = B

Pete
Shoot first and shoot people who ask questions, later.
Reply


Messages In This Thread
RE: Using the tenary operator in C with 3 numbers - by Pete - 08-08-2024, 08:53 PM



Users browsing this thread: 4 Guest(s)