How can a called function determine the number of arguments that have been passed to it?
Answer / Deepak Kumar Giri
In C++, you cannot directly get the number of arguments passed to a function because functions are statically scoped. However, you can use variable-length argument lists (also known as varargs) to achieve this flexibility. To implement varargs, you can use the ellipsis (...) operator in the function declaration and process the arguments using va_arg(3).
| Is This Answer Correct ? | 0 Yes | 0 No |
Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.
what is c++
What are vectors used for in c++?
Types of storage and scope of each type
Can we have "Virtual Constructors"?
Can turbo c++ run c program?
Explain the difference between static and dynamic binding of functions?
what are the iterator and generic algorithms.
How do I use turbo c++?
Which is better turbo c++ or dev c++?
What is the use of object in c++?
Do class declarations end with a semicolon? Do class method definitions?