Examveda

What will be the output of the following C code if it is executed on a 32 bit processor?
#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

Answer: Option B


This Question Belongs to C Program >> Memory Allocation

Join The Discussion

Related Questions on Memory Allocation