c语言指针排序算法_C语言中的指针算法

c语言指针排序算法

If you want to have complete knowledge of pointers, pointer arithmetic is very important to understand. In this topic we will study how the memory addresses change when you increment a pointer.

如果您想完全了解指针,那么了解指针算法非常重要。 在本主题中,我们将研究当增加指针时内存地址如何变化。

16位计算机(Turbo C) (16 bit Machine (Turbo C))

In a 16 bit machine, size of all types of pointer, be it int*, float*, char* or double* is always 2 bytes. But when we perform any arithmetic function like increment on a pointer, changes occur as per the size of their primitive data type.

在16位计算机中,所有类型的指针( int*float*char*double*大小始终为2个字节 。 但是,当我们执行任何算术函数(例如,对指针进行增量)时,会根据其原始数据类型的大小发生更改。

Size of datatypes on 16-bit Machine:

16位计算机上数据类型的大小:

Type Size (in bytes)
int or signed int 2
char 1
long 4
float 4
double 8
long double 10
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值