51. To where does the program control transfers when the exception is arisen?
52. How many ways of passing a parameter are there in c++?
53. Which is used to keep the call by reference value as intact?
54. Overloaded functions are . . . . . . . .
55. What we can't place followed by the non-default arguments?
56. What are the advantages of passing arguments by reference?
57. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
namespace space
{
int x = 10;
}
namespace space
{
int y = 15;
}
int main(int argc, char * argv[])
{
space::x = space::y =5;
cout << space::x << space::y;
}
#include <iostream>
using namespace std;
namespace space
{
int x = 10;
}
namespace space
{
int y = 15;
}
int main(int argc, char * argv[])
{
space::x = space::y =5;
cout << space::x << space::y;
}
58. Which symbol is used to declare the preprocessor directives?
59. If the user did not supply the value, what value will it take?
60. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
void func(int a, bool flag = true)
{
if (flag == true )
{
cout << "Flag is true. a = " << a;
}
else
{
cout << "Flag is false. a = " << a;
}
}
int main()
{
func(200, false);
return 0;
}
#include <iostream>
using namespace std;
void func(int a, bool flag = true)
{
if (flag == true )
{
cout << "Flag is true. a = " << a;
}
else
{
cout << "Flag is false. a = " << a;
}
}
int main()
{
func(200, false);
return 0;
}
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.