SKILL BENCHMARK

C++ File and Exception Handling Competency (Intermediate Level)

  • 25m
  • 25 questions
The C++ File and Exception Handling Competency benchmark will assess your ability to enumerate C++ file stream classes, read data using ifstream, write data using ofstream, and perform advanced file stream operations. You will be evaluated on your skills in throwing and handling exceptions using try-catch blocks, enumerating semantics and limitations of noexcept, and mitigating problems related to exceptions thrown during object construction. A learner who scores high on this benchmark demonstrates that they have the skills to work with File systems in C++ and practice the right methodology to handle exceptions in a program.

Topics covered

  • cascade errors up the stack trace
  • define multiple catch blocks to handle exceptions
  • handle exceptions using the try-catch block
  • overload and use the insertion operator
  • overload the extraction operator
  • perform operations using the filesystem library
  • read in and write out data to text files
  • read in data in a structured format
  • read in single and multi-word strings
  • recall why exceptions must be caught by reference
  • recognize methods for propagating errors in code
  • review operations with input streams
  • review the good, bad, eof, and fail state bits
  • throw and handle exceptions
  • throw exceptions using exception classes
  • use custom exceptions and catch blocks
  • use open() and close() functions to manage file handles
  • use seekg() to perform random access operations
  • use the ate mode to write out data
  • use the filesystem library
  • use the function-try-block to clean up resources
  • violate the noexcept keyword
  • write out and read in actual binary data
  • write out formatted and structured data
  • write out text data using ostream objects

RECENTLY ADDED COURSES