81. Which operator is used for accessing a member of namespace?
82. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
namespace extra
{
int i;
}
void i()
{
using namespace extra;
int i;
i = 9;
cout << i;
}
int main()
{
enum letter { i, j};
class i { letter j; };
::i();
return 0;
}
#include <iostream>
using namespace std;
namespace extra
{
int i;
}
void i()
{
using namespace extra;
int i;
i = 9;
cout << i;
}
int main()
{
enum letter { i, j};
class i { letter j; };
::i();
return 0;
}
83. To which does the function pointer point to?
84. What will happen when the handler is not found for an exception?
85. What will be the output of the following C++ code?
#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;
}
#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;
}
86. Which of the following permits function overloading on c++?
87. What happens to a function defined inside a class without any complex operations (like looping, a large number of lines, etc)?
88. Which of the following feature is used in function overloading and function with default argument?
89. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int mult (int x, int y)
{
int result;
result = 0;
while (y != 0)
{
result = result + x;
y = y - 1;
}
return(result);
}
int main ()
{
int x = 5, y = 5;
cout << mult(x, y) ;
return(0);
}
#include <iostream>
using namespace std;
int mult (int x, int y)
{
int result;
result = 0;
while (y != 0)
{
result = result + x;
y = y - 1;
}
return(result);
}
int main ()
{
int x = 5, y = 5;
cout << mult(x, y) ;
return(0);
}
90. An inline function is expanded during . . . . . . . .
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.