Data Types


  1. 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;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    10.6f results in 10.6 to be stored in floating point representations.


  1. Which is correct with respect to size of the data types?











  1. 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.



  1. The size of an object or a type can be determined using which operator?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    The sizeof operator gives the size of the object or type.


  1. Choose the right option
    string* p, q;












  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    * is to be grouped with the variables, not the data types.



  1. Implementation dependent aspects about an implementation can be found in ____











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    The limit header holds the details of the machine dependent details.