Why are symbolic constants usually a better choice than


Quick Review Integers are used for holding whole numbers. When using integers, keep an eye out for overflow and integer division problems. Use fixed-width integers instead of the variable size integers. Floating point numbers are used for holding real numbers (which can have fractional components). When using floating point numbers, keep an eye out for precision issues, rounding errors, and comparison issues. Boolean values hold only true and false. They do not have any major issues. Char values are integers that can be interpreted as an ASCII value. When using chars, be careful not to mix up ASCII code values and numbers, and watch for overflow and integer division problems. Use the const keyword to declare symbolic constants instead of #define. It's safer.

Comprehensive quiz Question 1- Why are symbolic constants usually a better choice than literal constants? Why are const symbolic constants usually a better choice than #defined symbolic constants?

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Why are symbolic constants usually a better choice than
Reference No:- TGS01145468

Now Priced at $5 (50% Discount)

Recommended (96%)

Rated (4.8/5)