Home » C Programming » Data Types » Question
  1. What will be the output of the following C code on a 32-bit machine?
    #include <stdio.h>
    int main()
    {
    int n = 210;
    double m = 65;
    int *ptr1 = &n;
    double *ptr2 = &m;
    printf("n and m are %d and %d", sizeof(ptr1), sizeof(ptr2));
    return 0;
    }
    1. 210
    2. 65
    3. Depends on compiler
    4. Compilation Error
    5. None of these
Correct Option: C

Size of any type of pointer is 4 on a 32-bit machine and 8 on 64-bit machine.



Your comments will be displayed only after manual approval.