Operators


  1. What is the output of this program?
    #include <iostream>
    using namespace std;
    int main()
    {
    double P = 12.93099;
    float Q = 11.120;
    int R ;
    R = (int) P;
    cout << R <<" ";
    R = (int) Q;
    cout << R ;
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    In this program, we casted the data type to integer.


  1. How are types therein user-defined conversion?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    There are two types of user-defined conversions. They are conversion by the constructor, Conversion functions.



  1. Pick out the correct syntax of operator conversion.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    operator float()const


  1. How to stop your program from eating so much ram?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    *Use the hard drive, instead of RAM.
    *Declare it in program memory, instead of on the stack.
    *Find a way to work with the data one at a time.



  1. What are the essential operators in c++?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    +, |, and <= all are the essential operators in c++.