Lucy wants to declare a function that can add two numbers but doesn't want to specify how it does it. What should she provide?
- Function Argument
- Function Call
- Function Declaration
- Function Definition
Lucy should provide a function declaration. A function declaration defines the function's name, return type, and parameter list without specifying the actual implementation or logic. This allows her to declare the function's existence and signature without writing the code for adding two numbers.
Loading...
Related Quiz
- Unlike if-else, switch-case in C++ does not support _______ type for case values.
- How does function overloading relate to the concept of polymorphism in C++?
- The keyword _______ is used to grant a function or class access to the private and protected members of another class in C++.
- For a function whose return type is deduced at the time of its invocation, the keyword ______ is used.
- What is the key difference between overriding and overloading a function in C++?