Question
#include <iostream>
using namespace std;
int func(int m = 10, int n)
{
int c;
c = m + n;
return c;
}
int main()
{
cout << func(5);
return 0;
}
a.
15
b.
10
c.
compile time error
d.
none of the mentioned
Posted under Object Oriented Programming Using C++
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. Which header file is used to pass unknown number of arguments to function?
View solution
Q. How can you access the arguments that are manipulated in the function?
View solution
Q. What is the maximum number of arguments or parameters that can be
View solution
Q. Which header file should you include if you are to develop a function that can accept variable number of arguments?
View solution
Q. What will initialize the list of arguments in stdarg.h header file?
View solution
Q. To which does the function pointer point to?
View solution
Q. What we will not do with function pointers?
View solution
Q. What is the default calling convention for a compiler in c++?
View solution
Q. What are the mandatory part to present in function pointers?
View solution
Q. which of the following can be passed in function pointers?
View solution
Q. What is meaning of following declaration?
int(*ptr[5])();
View solution
Q. Which keyword is used to define the macros in c++?
View solution
Q. Which symbol is used to declare the preprocessor directives?
View solution
Q. How many types of macros are there in c++?
View solution
Q. What is the mandatory preprosessor directive for c++?
View solution
Q. What is the other name of the macro?
View solution
Q. Which of the following is used to implement the c++ interfaces?
View solution
Q. What is the ability to group some lines of code that can be included
View solution
Q. How many types does functions fall depends on modularization?
View solution
Q. How many types of modularization are there in c++?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!