21. Which of the following is a valid function declaration in C++?
22. What is the purpose of function overloading in C++?
23. What does the 'inline' keyword do in C++ function declaration?
24. What is the output of the following code: int max(int a, int b) { return (a > b) ? a : b; } int main() { cout << max(5, 5); } in C++?
25. In C++, how are function arguments passed by default?
26. What is the purpose of the 'static' keyword in a function declaration in C++?
27. What is the syntax for defining a recursive function in C++?
28. What will be the output of the following code: int add(int x, int y) { return x + y; } int main() { cout << add(2); } in C++?
29. What is the purpose of the 'extern' keyword in a function declaration in C++?
30. What is the correct way to pass an array to a function in C++?
Read More Section(Functions and Procedures in C plus plus)
Each Section contains maximum 100 MCQs question on Functions and Procedures in C plus plus. To get more questions visit other sections.