Introduction to Programming

Question #34

Read the question, compare the options, and review the correct answer below.

CS201 · Midterm#34

A Matrix can be composed of ints, floats or doubles as their elements. Best way is to handle this ,_______________

  1. A
    Write a separate class to handle each
  2. B
    Use templates
  3. C
    Use strings to store all types
  4. D
    None of the given options
Show correct answer

Correct answer: B. Use templates

Check community answers against your course notes.
← More practice questionsTake a timed test