Data Types
-  What is the output of this program?
#include
using namespace std;
int main()
{
float num0 = 10.6;
double num1 = 10.6;
if (num0 == 10.6f)
cout << "Interview";
else
cout << "Mania";
return 0;
} 
- 
                        
View Hint View Answer Discuss in Forum
NA
Correct Option: B
10.6f results in 10.6 to be stored in floating point representations.
 
-  Which is correct with respect to size of the data types?
 
- 
                        
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The char has less bytes than int and int has less bytes than double whereas int and float can potentially have same sizes.
 
-  The size of an object or a type can be determined using which operator?
 
- 
                        
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The sizeof operator gives the size of the object or type.
 
-  Choose the right option
string* p, q;
 
- 
                        
View Hint View Answer Discuss in Forum
NA
Correct Option: C
* is to be grouped with the variables, not the data types.
 
-  Implementation dependent aspects about an implementation can be found in ____
 
- 
                        
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The limit header holds the details of the machine dependent details.