Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using the tenary operator in C with 3 numbers
#3
Pete
the difference is that you can assign the ternary expression to a variable, you can basically do the same with if then else, but sometimes you can simplify things by using the ternary expression, but I confess that the ternary operator looks weird unless you use it a lot
Reply


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



Users browsing this thread: 1 Guest(s)