Data Types


  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.



  1. Select the right option.
    Given the variables a, b are of char type and c, d, e are of int type
    i. e = (c * d) / (c + d);
    ii. e = (a * b) / (c + d);











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Every character constant has an integer value. Also char belongs to the integral type hence arithmetic and logical operations can be performed on them.