C++ Data Types

What is the size of an int data type in C++ compiler?
4 Bytes
2 Bytes
1 Byte
Cannot be determined
What is the output of this C code?
void main() {
cout<<sizeof(float);
}
4
8
2
Error
Comment on the output of this C code?

void main()
{
float f1 = 0.1;
if (f1 == 0.1)
cout<<"equal\n";
else
cout<<"not equal\n";
}
Equal
Not equal
Output depends on compiler
None of the mentioned
void main()
{
float f1 = 0.1;
if (f1 == 0.1f)
cout<<"equal\n";
else
cout<<"not equal\n";
}
Equal
Not equal
Output depends on compiler
None of the mentioned
Which is correct with respect to size of the datatypes?
Char > int > float
double > char > int
Char < int < double
Int > char > float
What is range of int data type?
-32768 to 32767
-32768 to 32768
0 to 32767
-128 to 127
What is output?
cout<<sizeof("1");
2
1
4
None of these
What is output?
cout<<sizeof('1');
1
2
4
None of these
What is output?
cout<<sizeof(1);
1
2
4
None of these
Select Built-in type types
Functon
String
Void
Pointer
{"name":"C++ Data Types", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What is the size of an int data type in C++ compiler?, What is the output of this C code? void main() { cout<<sizeof(float); }, Comment on the output of this C code? void main() { float f1 = 0.1; if (f1 == 0.1) cout<<\"equal\\n\"; else cout<<\"not equal\\n\"; }","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker