Page 1 of 1

What will be the output of the following C code (considering sizeof char is 1 and pointer is 4)?

Posted: Wed Jul 13, 2022 7:54 pm
by answerhappygod
#include <stdio.h> int main() { char *a[2] = {"hello", "hi"}; printf("%d", sizeof(a)); return 0; }
a) 9
b) 4
c) 8
d) 10