In our grading example in this section, what would happen if we used unsigned int as the type for quiz1
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:4| Question number:26
All Answers
total answers (1)
The standard guarantees the minimum size of `int` is 16 bits, and the minimum size of `long` is 32 bits. Since the teacher has 30 students in a class, which needs at least 30 bits, `int` would be not enough to hold all the results.
need an explanation for this answer? contact us directly to get an explanation for this answer