91. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main ( )
{
static double i;
i = 20;
cout << sizeof(i);
return 0;
}
#include <iostream>
using namespace std;
int main ( )
{
static double i;
i = 20;
cout << sizeof(i);
return 0;
}
92. Identify the incorrect option.
93. Choose the incorrect option.
94. Find the odd one out.
95. Which variable does equals in size with enum variable?
96. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
enum colour
{
green, red, blue, white, yellow, pink
};
int main()
{
cout << green<< red<< blue<< white<< yellow<< pink;
return 0;
}
#include <iostream>
using namespace std;
enum colour
{
green, red, blue, white, yellow, pink
};
int main()
{
cout << green<< red<< blue<< white<< yellow<< pink;
return 0;
}
97. Which of the two operators ++ and - work for the bool data type in C++?
98. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int i;
enum month
{
JAN = 1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
};
for (i = MAR; i <= NOV; i++)
cout << i;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int i;
enum month
{
JAN = 1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
};
for (i = MAR; i <= NOV; i++)
cout << i;
return 0;
}
99. What is the range of the floating point numbers?
100. Which of the following belongs to the set of character types?
Read More Section(Variables and Data Types in C plus plus)
Each Section contains maximum 100 MCQs question on Variables and Data Types in C plus plus. To get more questions visit other sections.