Data Types


  1. In C++, what is the sign of character data type by default?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The standard does not specify if plain char is signed or unsigned. There are three distinct character types according to the standard: char, signed char and unsigned char.


  1. What is the output of this program?
    #include 
    using namespace std;
    int main()
    {
    char ch = 'M';

    cout<< ch;
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    M



  1. How do we represent a wide character of the form wchar_t?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    A wide character is always indicated by immediately preceding the character literal by an L.


  1. What will be the output of this program?
    #include
    using namespace std;
    int main()
    {
    char ch = 65;
    cout<< ch;
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The literal value for 65 is A. So it will be printing A.



  1. Which of the following belongs to the set of character types?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    wchar_t and char is used to represent wide character and character.