C Programming - Complicated Declarations - Discussion

Discussion Forum : Complicated Declarations - Find Output of Program (Q.No. 6)
6.
What will be the output of the program?
#include<stdio.h>

int main()
{
    char huge *near *far *ptr1;
    char near *far *huge *ptr2;
    char far *huge *near *ptr3;
    printf("%d, %d, %d\n", sizeof(ptr1), sizeof(*ptr2), sizeof(**ptr3));
    return 0;
}
4, 4, 4
2, 4, 4
4, 4, 2
2, 4, 8
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
21 comments Page 2 of 3.

Shyam said:   8 years ago
What is the diff used to find whether a question is 32/64bit?

Harsha said:   1 decade ago
What actually mean near, far and huge pointers ?

Pravin said:   1 decade ago
Please give the explanation about this problem.

Radha said:   10 years ago
Please to solve the program. I need answer.

Ravikumar said:   1 decade ago
Give the explanation of the answer......

Manjulavani said:   2 decades ago
I want explanation about this problems.

Anil said:   1 decade ago
But how? can anyone explain this one.

Mani said:   1 decade ago
Pointer size in 64 bit is 4 bits.

Alia said:   8 years ago
Please explain this.

Kishore said:   1 decade ago
Explanation please.


Post your comments here:

Your comments will be displayed after verification.