What is the output of this program?

#include<stdio.h>
#inlcude<stdlib.h>

int main()
{
int *ptr;
double *ptr;
printf("%dn",sizeof(ptr));
return 0;
}
a) 4
b) 8
c) the compiler will give the error
d) segmentaion fault

Submitted by: Murtaza
c) the compiler will give the error
Explanation:
Just see the output carefully.
Output:
[root@localhost google]# gcc -o san san.c
san.c: In function 'main':
san.c:8:10: error: conflicting types for 'ptr'
san.c:7:7: note: previous declaration of 'ptr' was here
[root@localhost google]#
Submitted by: Murtaza

Read Online Device Drivers Job Interview Questions And Answers