使用diff指针 [英] Use of diff pointers

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

问题描述

你好

Iam Niranjan ...我有一个小疑问。


void main()

{

int size;

size = sizeof(int *);

printf(" \ n size of int * ------ >%x" size);

size = sizeof(char *);

printf(\\'n char of char * ------> ;%x" size);

size = sizeof(float *);

printf(" \ n size of float * ------> %x尺寸;

}

这里所有三个都有相同的尺寸。

当这三个尺寸相同时...为什么我们需要不同类型的

指针..

plz澄清任何一个..

感谢你

Niranjan

Hello
Iam Niranjan... i have one small doubt.

void main()
{
int size;
size = sizeof(int *);
printf("\n size of int *------>%x"size);
size = sizeof(char *);
printf("\n size of char *------>%x"size);
size = sizeof(float *);
printf("\n size of float *------>%x"size);
}
here i got the same size for all three.
when all three taking the same size... why we need different type of
pointers..
plz clarify any one..
Thanking you
Niranjan

推荐答案

Comp.Lang.c说:
Comp.Lang.c said:
你好
Iam Niranjan ...我有一个小疑问。

void main()
Hello
Iam Niranjan... i have one small doubt.

void main()




第1课:main返回int,而不是void。


当你吸收那个文件时sson,请告诉我们。


-

Richard Heathfield

Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk

电子邮件:rjh在上面的域名(但显然放弃了www)



Lesson 1: main returns int, not void.

When you have absorbed that lesson, let us know.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)


主要返回类型和&之间的关系指针大小......?

whats the relation between main return type & pointers size...?


Comp.Lang.c说:
Comp.Lang.c said:
主要回归之间的关系是什么类型&指针大小...?
whats the relation between main return type & pointers size...?




无论如何,因为main总是返回int。


当你明白,我们可以转到你的例子中的下一个错误

程序。在你正确地理解旧事物之前,似乎没有任何意义教你新东西

。这就像在沙滩上建造

a房子。


-

Richard Heathfield

" ; Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk

电子邮件:rjh在上面的域名(但显然放弃了www)



None whatsoever, because main always returns int.

When you understand that, we can move on to the next error in your example
program. There doesn''t seem to be any point in teaching you new things
until you''ve understood the old things correctly. It would be like building
a house on sand.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)


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

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