Home » C++ Programming » References » Question
  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. 2
    2. 4
    3. 6
    4. 8
    5. Depends on compiler
Correct Option: A

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



Your comments will be displayed only after manual approval.