What is the best way to write an if-else statement


Discussion:

Q: Given the expression below:

int variable = ++d >3 ?0:d;

What is the best way to write this as an if-else statement? What is this code trying to do? What is good about using this approach? Why it is bad?

 

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: What is the best way to write an if-else statement
Reference No:- TGS01937998

Now Priced at $20 (50% Discount)

Recommended (96%)

Rated (4.8/5)