Home » C++ Programming » Data Types » Question
  1. What would be the output of the following program (in 32-bit systems)?
    #include 
    using namespace std;
    int main()
    {
    cout << sizeof(char);
    cout << " "<< sizeof(int);
    cout << " "<< sizeof(float);
    return 0;
    }
    1. 1 4 4
    2. 4 4 1
    3. 4 1 4
    4. Garbage value
    5. None of these
Correct Option: A

Character is 1 byte, integer 4 bytes and float 4 bytes.



Your comments will be displayed only after manual approval.