C中指针的大小? [英] size of pointer in C?

查看:123
本文介绍了C中指针的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DOS上C的指针大小是多少?

是sizeof(int)还是size(long int)?

如果这个ans出现在FAQ中请告诉我这个问题

解决方案

siliconwafer写道:

C中指针的大小是多少DOS?
是sizeof(int)还是size(long int)?
如果这个ans存在于FAQ中请指导我ouestion




它是sizeof(void *)...

它可能是sizeof(void *)== sizeof(long),但它可能不一样。

任何依赖于上述条件的东西都被认为是不便携的。

-

一个人的自由停止在别人'开始的地方


Giannis Papadopoulos

计算机与通信工程系。 (CCED)

塞萨利大学
http:// dop.users.uth.gr


Giannis Papadopoulos写道:


siliconwafer写道:

在DOS上用C指针的大小是什么?
是sizeof(int)还是size(long int)?
如果这个ans存在于FAQ中请指导我使用 blockquote>

它是sizeof(void *)




指向void的指针与指向char的指针大小相同。


指向结构的指针大小相同。


大多数其他类型指针的大小

没有特殊规格。


-

pete


文章< 11 ****** ****************@o13g2000cwo.googlegroups .com> ;,

siliconwafer< sp ********* @ yahoo.com>写道

DOS上C的指针大小是多少?
是sizeof(int)还是size(long int)?
如果这个ans存在于FAQ中请直接我ouestion




plz wrt in engsh


-

\ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \

\ / \ / \ / \ / \ Chris Hills Staffs England / \ / \ / \ / \ /

/ \ / \ / ch *** @ phaedsys.org www.phaedsys.org \ / \ / \

\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ /


What is size of pointer in C on DOS?
is it sizeof(int ) or size of (long int)?
If this ans is present in FAQ pls direct me to tht ouestion

解决方案

siliconwafer wrote:

What is size of pointer in C on DOS?
is it sizeof(int ) or size of (long int)?
If this ans is present in FAQ pls direct me to tht ouestion



It is sizeof(void*)...
It may be sizeof(void*)==sizeof(long), but it may not be as well.
Whatever depends on the conditional above is considered not portable.
--
one''s freedom stops where others'' begin

Giannis Papadopoulos
Computer and Communications Engineering dept. (CCED)
University of Thessaly
http://dop.users.uth.gr


Giannis Papadopoulos wrote:


siliconwafer wrote:

What is size of pointer in C on DOS?
is it sizeof(int ) or size of (long int)?
If this ans is present in FAQ pls direct me to tht ouestion



It is sizeof(void*)



Pointers to void are the same size as pointers to char.

Pointers to structures are the same size as each other.

The sizes of most other types of pointers
have no special specifications.

--
pete


In article <11**********************@o13g2000cwo.googlegroups .com>,
siliconwafer <sp*********@yahoo.com> writes

What is size of pointer in C on DOS?
is it sizeof(int ) or size of (long int)?
If this ans is present in FAQ pls direct me to tht ouestion



plz wrt in engsh

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/


这篇关于C中指针的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆