Select an option to see the answer and solution.
Functions and Procedures in C++
practice.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
176
Questions
5/9
Page
Pick an option on a question to see the right answer and solution.
#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;
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
#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;
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
#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);
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
#include <iostream>
#include <stdarg.h>
using namespace std;
int flue(char c,...);
int main()
{
int x, y;
x = flue('A', 1, 2, 3);
y = flue('1', 1.0,1, '1', 1.0f, 1l);
cout << x << y;
return 0;
}
int flue(char c,...)
{
return c;
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Q100
Open question#include <iostream>
using namespace std;
int Add(int X, int Y, int Z)
{
return X + Y;
}
double Add(double X, double Y, double Z)
{
return X + Y;
}
int main()
{
cout << Add(5, 6);
cout << Add(5.5, 6.6);
return 0;
}Select an option to see the answer and solution.