Skip to content

07 - Quiz

  • Your name:

  • Your VT email:


What property of the duplicates program allows it to handle arbitrarily large input streams?

  • A. It stores input lines in an array/slice before processing
  • B. It reads input incrementally using a line-by-line scanner
  • C. It relies on buffered output
  • D. It sorts input before counting

Why does the duplicates program print results after reading all input?

  • A. Because maps can only be iterated once
  • B. Because duplicates cannot be detected until all input is read
  • C. Because standard input must be closed first
  • D. Because the final counts are only known after scanning completes

What is a key limitation of the current duplicates program?

  • A. It cannot read from standard input
  • B. It cannot detect duplicates
  • C. It must store all distinct lines in memory
  • D. It only works without special characters in the text

Why is streaming I/O (i.e., input/output) important?

  • A. It simplifies syntax
  • B. It improves readability
  • C. It allows programs to handle large or unbounded data
  • D. It eliminates the need for error handling