71.
What will happen while using pass by reference?

72.
What will be the output of the following C++ code?
#include <iostream>
#include <string>
using namespace std;
namespace 
{
	int var = 10;
}
int main()
{
	cout<<var;
}

75.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int operate (int a, int b)
{
    return (a * b);
}
float operate (float a, float b)
{
    return (a / b);
}
int main()
{
    int x = 5, y = 2;
    float n = 5.0, m = 2.0;
    cout << operate(x, y) <<"\t";
    cout << operate (n, m);
    return 0;
}

76.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
#define PR(id) cout << "The value of " #id " is "<<id
int main()
{
    int i = 10;
    PR(i);
    return 0;
}

78.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
 
int fun(int=0, int = 0);
 
int main()
{
  cout << fun(5);
  return 0;
}
int fun(int x, int y) { return (x+y); }

80.
In which of the following cases inline functions may not word?
i. If the function has static variables.
ii. If the function has global and register variables.
iii. If the function contains loops
iv. If the function is recursive

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.