For a function to accept a variable number of arguments, it should use the keyword ______.
- extern
- static
- varargs
- virtual
For a function to accept a variable number of arguments, it should use the keyword "varargs" (short for variable-length argument list). Varargs is used in C and some C++ code to create functions that can accept a variable number of arguments. This is often used in functions like printf(), scanf(), and other cases where the number of arguments can vary.
Loading...
Related Quiz
- Consider a class hierarchy with Base and Derived classes. An object of Derived throws an exception that is caught in a catch block for Base exceptions. What considerations might be relevant to the use of dynamic_cast inside the catch block?
- Can recursive functions be declared as inline?
- Which standard library provides predefined exception classes in C++?
- Bob is noticing that his compiled program size is much larger than expected after he marked several lengthy functions as inline. What could be a reason for this?
- Which C++ statement is used to make a single conditional decision?