SKILL BENCHMARK

C++ Functions Competency (Intermediate Level)

  • 12m
  • 12 questions
The C++ Functions Competency (Intermediate Level) benchmark measures your ability to use free functions in C++ and correctly utilize pass-by-reference semantics with const reference input arguments. You will be assessed on your skills in identifying and mitigating the dangling pointer problem, correctly overloading functions based on input arguments and const, and splitting functions across .h and .cpp files. Learners who score high on this benchmark demonstrate that they have the skills to define and use functions and implement function overloading in C++.

Topics covered

  • create functions and contrast declarations and definitions
  • create multiple functions with the same name
  • explore how to return pointers and references from functions
  • outline the features of functions in C++
  • pass in input arguments with default values
  • pass in references to vectors
  • recall how references are passed by reference
  • recall how to use pass-by-value with pointers
  • recall that strings are passed by value
  • split code into header files
  • use the auto keyword with return values of a function
  • work with overloading functions