关于C中的指针

DD2*_*D24 1 c c++ pointers char

我开始阅读一些关于C中指针的文章,我有一个我不明白的例子.以下代码的输出应该是什么.. ??

    main()
     {
      char far *s1 ,*s2;
      printf("%d,%d",sizeof(s1),sizeof(s2));
     }
Run Code Online (Sandbox Code Playgroud)

OUTPUT-4,2

根据我的说法,sizeof()函数返回的值应为4,因为far指针有4字节地址.

但解决方案手册中的答案是4,2.谁能解释一下?任何人都可以解释> ???

fra*_*ji1 6

这和写作一样

char far *s1;
char *s2;
the "far" is not distributed across all variables, e.g.
char far *s1, ch;
Run Code Online (Sandbox Code Playgroud)

对正常人物ch没有意义.

因此,s2不是"远"指针,而是作为"近"指针处理,在目标中为16位宽.