51. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int a = 10;
if (a < 10)
{
for (i = 0; i < 10; i++)
cout << i;
}
else
{
cout << i;
}
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int a = 10;
if (a < 10)
{
for (i = 0; i < 10; i++)
cout << i;
}
else
{
cout << i;
}
return 0;
}
52. What happens when a null pointer is converted into bool?
53. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
float i = 123.0f;
cout << i << endl;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
float i = 123.0f;
cout << i << endl;
return 0;
}
54. Pick the odd one out.
55. How many characters are specified in the ASCII scheme?
56. Choose the correct option.
extern int i;
int i;
extern int i;
int i;
57. Which is used to indicate single precision value?
58. 0946, 786427373824, 'x' and 0X2f are . . . . . . . . and . . . . . . . . literals respectively.
59. In which type do the enumerators are stored by the compiler?
60. The value 132.54 can be represented using which data type?
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.