当前位置:网站首页>Count the number of arrays with pointers
Count the number of arrays with pointers
2022-06-28 23:08:00 【51CTO】
Using the array address subtraction to calculate the number of elements of the array
int
my_strlen(
char
*
str)
{
char
*
star
=
str;
char
*
end
=
str;
while (
*
end
!=
'\0')
{
end
++;
}
return
end
-
star;
}
int
main()
{
char
arr[]
=
"bit";
int
len
=
my_strlen(
arr);
printf(
"%d\n",
len);
return
0;
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
边栏推荐
- What is the difference between WMS warehouse management system and ERP
- 一文搞懂shell脚本
- [deep learning] (3) encoder mechanism in transformer, complete pytoch code attached
- Leetcode 324 Swing sort II [tri double pointeur] le chemin du leetcode pour l'héroding
- Lecun predicts AgI: big model and reinforcement learning are both ramps! My world model is the new way
- [chapter 71 of the flutter problem series] mutual conversion between uint8list and image in flutter
- keil工程,程序写多后,RTT不能打印
- Online linear programming: Dual convergence, new algorithms, and regret bounds
- Fanuc robot_ Introduction to Karel programming (2)_ Usage of general IO signal
- C interview questions_ 20220627 record
猜你喜欢

How to use London gold to draw support resistance line

见丰知夏|国漫鼻祖丰子恺,数字藏品独家发售

Production environment sonarqube installation

LeCun预言AGI:大模型和强化学习都是斜道!我的世界模型才是新路
![[deep learning] (3) encoder mechanism in transformer, complete pytoch code attached](/img/cb/d385bee7a229e8d11f5fa8af66311f.gif)
[deep learning] (3) encoder mechanism in transformer, complete pytoch code attached

This simple little function saves 213 hours for our production research team in half a year

Fanuc robot_ Introduction to Karel programming (2)_ Usage of general IO signal

两栏布局左边图片显示部分由右边内容高度决定

See fengzhixia | FENGZikai, the originator of Guoman, for exclusive sale of Digital Collections

【深度学习】(2) Transformer 网络解析,代码复现,附Pytorch完整代码
随机推荐
在线SQL转HTMLTable工具
【Try to Hack】nmap
【Word 教程系列第 2 篇】Word 中如何设置每页的表格都有表头
计数排序和排序的稳定性
一文搞懂shell脚本
Online sql to htmltable tool
Chapter V virtual memory exercise
Redis+aop+ user defined annotation to realize flow restriction
The Best of Many Worlds_ Dual Mirror Descent for Online Allocation Problems
Go language - reflect
超级工厂里的生意图鉴
运维排查-使用hcache插件排查Buffer/cache占用过高
How to solve the problem of desktop without sound
带链接跳转的微信红包封面制作教程和使用指南
LeCun预言AGI:大模型和强化学习都是斜道!我的世界模型才是新路
YuMinHong set up two funds funded by his hometown
WEB API学习笔记1
月薪6万,互联网“降本增效”后,这类人开始被疯抢
Code example of hiredis
leetCode-栈类型详解