Programming Languages C Objective
Mar 07, 2013

What will be output of following c code?

#include<stdio.h>

int main(){

int *p1,**p2;

double *q1,**q2;

clrscr();

printf("%d %d ",sizeof(p1),sizeof(p2));

printf("%d %d",sizeof(q1),sizeof(q2));

getch();

return 0;

}

Choose the correct answer:
A) 2 2 2 2
B) 1 2 8 9
C) 1 2 4 3
D) Compiler error
Detailed Explanation

Size of any type of pointer is 2 byte (In case of near pointer).

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback