Operators


  1. What is the use of dynamic_cast operator?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Because the dynamic_cast operator is used to convert from base class to derived class.


  1. What is the output of this program?
    #include 
    using namespace std;
    int main()
    {
    int p;
    p = 15 + 13 * 6;
    cout << p;
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Because the * operator is having highest precedence, So it is executed first and then the + operator will be executed.



  1. What is this operator called ?:?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    In this operator, if the condition is true means, it will return the first operator, otherwise second operator.


  1. Which operator is having the highest precedence?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The operator which is having highest precedence is postfix and lowest is equality.



  1. Which operator is having the right to left associativity in the following?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Type cast