What will be the output of the following C code on a 32-bit machine?
Posted: Wed Jul 13, 2022 7:54 pm
#include <stdio.h> int main() { int x = 10000; double y = 56; int *p = &x; double *q = &y; printf("p and q are %d and %d", sizeof(p), sizeof(q)); return 0; }
a) p and q are 4 and 4
b) p and q are 4 and 8
c) compiler error
d) p and q are 2 and 8
a) p and q are 4 and 4
b) p and q are 4 and 8
c) compiler error
d) p and q are 2 and 8