81. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
enum channel {star, sony, zee};
enum symbol {hash, star};
int i = 0;
for (i = star; i <= zee; i++)
{
printf("%d ", i);
}
return 0;
}
#include <iostream>
using namespace std;
int main()
{
enum channel {star, sony, zee};
enum symbol {hash, star};
int i = 0;
for (i = star; i <= zee; i++)
{
printf("%d ", i);
}
return 0;
}
82. What does '\a' escape code represent?
83. What will be the output of the following C++ code?
#include <iomanip>
#include <iostream>
using namespace std;
int main()
{
cout << setprecision(17);
double d = 0.1;
cout << d << endl;
return 0;
}
#include <iomanip>
#include <iostream>
using namespace std;
int main()
{
cout << setprecision(17);
double d = 0.1;
cout << d << endl;
return 0;
}
84. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
float num1 = 1.1;
double num2 = 1.1;
if (num1 == num2)
cout << "stanford";
else
cout << "harvard";
return 0;
}
#include <iostream>
using namespace std;
int main()
{
float num1 = 1.1;
double num2 = 1.1;
if (num1 == num2)
cout << "stanford";
else
cout << "harvard";
return 0;
}
85. How do we represent a wide character of the form wchar_t?
86. Which of the following statements are true?
int f(float)
int f(float)
87. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int a = 5;
float b;
cout << sizeof(++a + b);
cout << a;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int a = 5;
float b;
cout << sizeof(++a + b);
cout << a;
return 0;
}
88. Which of the following statements are false?
89. In C++, what is the sign of character data type by default?
90. Which of these expressions will isolate the rightmost set bit?
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.