Multiple choice technology programming languages

What is delegate in C++?

  1. Functions

  2. Templates

  3. Function pointers

  4. Pointer of pointers

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In C++, delegates are not built-in language constructs, but their conceptual equivalent is a function pointer (or std::function/functors), which stores a reference to a function to be called dynamically. Templates are compile-time code generators, and functions are direct invocations.