What will be the output of the following C code if it is executed on a 32 bit processor?
Posted: Wed Jul 13, 2022 7:56 pm
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *p;
p = (int *)malloc(20);
printf("%d\n", sizeof(p));
free(p);
return 0;
}
a) 2
b) 4
c) 8
d) Junk value
#include<stdlib.h>
int main()
{
int *p;
p = (int *)malloc(20);
printf("%d\n", sizeof(p));
free(p);
return 0;
}
a) 2
b) 4
c) 8
d) Junk value