当前位置:网站首页>Function (error prone)
Function (error prone)
2022-07-05 04:18:00 【Cao Lele loves learning】
Function passing array , When the pointer , It's just the starting address .
example :1 Sum of dimension groups
Find out , Find the size of the array , be equal to 2? instead of 5?
Explain it. 2 How did you get it : Because mine is 64 It's a plane , and sizeof(int) Everybody knows ,4 byte ,32 position ; therefore sizeof(p), It should be 64; Why 64? Because I said the first sentence : Function passing array , When the pointer , What is passed is only an address ,64 Address of bit machine , No, it is. 64bit Well .
therefore , To make an array ( The pointer ) Size , It should also be passed to the function in the form of formal parameters .
--------------------------------------------------------------------------------------------------------------------
A character array , Because there is at the end '\0', So sometimes it is not necessary to pass the array size when passing parameters
example : Remove spaces from string
边栏推荐
- Rome chain analysis
- Why do big companies such as Baidu and Alibaba prefer to spend 25K to recruit fresh students rather than raise wages by 5K to retain old employees?
- Burpsuite grabs app packets
- 蛇形矩阵
- MySQL: view with subquery in the from clause limit
- 【虚幻引擎UE】实现测绘三脚架展开动画制作
- Threejs implements labels and displays labels with custom styles
- Seven join join queries of MySQL
- 根据入栈顺序判断出栈顺序是否合理
- DFS and BFS concepts of trees and graphs
猜你喜欢
【FineBI】使用FineBI制作自定义地图过程
The development of mobile IM based on TCP still needs to keep the heartbeat alive
Threejs Internet of things, 3D visualization of farms (II)
[illusory engine UE] method to realize close-range rotation of operating objects under fuzzy background and pit recording
Interview related high-frequency algorithm test site 3
JVM garbage collection
“金九银十”是找工作的最佳时期吗?那倒未必
Longyuan war "epidemic" 2021 network security competition web easyjaba
Sequence diagram of single sign on Certification Center
Ctfshow web entry code audit
随机推荐
长度为n的入栈顺序的可能出栈顺序种数
【虚幻引擎UE】实现测绘三脚架展开动画制作
The scale of computing power in China ranks second in the world: computing is leaping forward in Intelligent Computing
Rust blockchain development - signature encryption and private key public key
[untitled]
The order of LDS links
陇原战“疫“2021网络安全大赛 Web EasyJaba
基于TCP的移动端IM即时通讯开发仍然需要心跳保活
这是一个不确定的时代
机器学习 --- 决策树
Containerd series - detailed explanation of plugins
电源管理总线 (PMBus)
What is the reason why the webrtc protocol video cannot be played on the easycvr platform?
行为感知系统
WGS84 coordinate system, web Mercator, gcj02 coordinate system, bd09 coordinate system - brief introduction to common coordinate systems
A應用喚醒B應該快速方法
Network layer - forwarding (IP, ARP, DCHP, ICMP, network layer addressing, network address translation)
Moco is not suitable for target detection? MsrA proposes object level comparative learning target detection pre training method SOCO! Performance SOTA! (NeurIPS 2021)...
Looking back on 2021, looking forward to 2022 | a year between CSDN and me
在线文本行固定长度填充工具