References


  1. What is the output of this program?
    #include <iostream>
    using namespace std;
    int main()
    {
    int num = 6;
    int* ptr = #
    cout << sizeof(ptr);
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    The size of a data type mainly depends on compiler only.


  1. What is the output of this program?
    #include  <iostream>
    using namespace std;
    int main()
    {
    double array[] = {3.0, 5.0, 6.0, 4.0};
    double *p = (array + 3);
    cout << *p << endl;
    cout << array << endl;
    cout << *(array + 2) << endl;
    cout << *(array) << endl;
    cout << *array + 6 << endl;
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    In this program, We are printing the values that are pointed by pointer and also the dereference operator.



  1. What does the dereference operator will return?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    It operates on a pointer variable, and returns an l-value equivalent to the value at the pointer address.