Q141
Open question#include <iostream>
using namespace std;
#define MAX 10
int main()
{
int num;
num = ++MAX;
cout << num;
return 0;
}Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
176
Questions
8/9
Page
Pick an option on a question to see the right answer and solution.
Q141
Open question#include <iostream>
using namespace std;
#define MAX 10
int main()
{
int num;
num = ++MAX;
cout << num;
return 0;
}Select an option to see the answer and solution.
Q142
Open question#include <iostream>
using namespace std;
void square (int *x)
{
*x = (*x + 1) * (*x);
}
int main ( )
{
int num = 10;
square(&num);
cout << num;
return 0;
}
a) 100Select an option to see the answer and solution.
Q143
Open questionSelect an option to see the answer and solution.
Q144
Open questionint(*ptr[5])();Select an option to see the answer and solution.
Q145
Open questionSelect an option to see the answer and solution.
Q146
Open questionOptions are not available for this question.
Select an option to see the answer and solution.
Q147
Open question#include <iostream>
using namespace std;
void fun(int x, int y)
{
x = 20;
y = 10;
}
int main()
{
int x = 10;
fun(x, x);
cout << x;
return 0;
}Select an option to see the answer and solution.
Q148
Open questionSelect an option to see the answer and solution.
Q149
Open questionSelect an option to see the answer and solution.
Q150
Open questionSelect an option to see the answer and solution.
Q151
Open questionSelect an option to see the answer and solution.
Q152
Open questionSelect an option to see the answer and solution.
Q153
Open questionSelect an option to see the answer and solution.
Q154
Open questionSelect an option to see the answer and solution.
Q155
Open questionSelect an option to see the answer and solution.
Q156
Open questionSelect an option to see the answer and solution.
Q157
Open question#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;
}Select an option to see the answer and solution.
Q158
Open questionSelect an option to see the answer and solution.
Q159
Open questionSelect an option to see the answer and solution.
Q160
Open question#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;
}Select an option to see the answer and solution.