Skip to content
小飞侠
  • 首页
  • 小程序
  • uniapp
  • vue
  • APICloud
  • 其他
菜单

博客

  1. 首页>
  2. 其他>
  3. 递归求字符串长度。

递归求字符串长度。

  • Post author:xfxia
  • Post published:2023年9月17日
  • Post category:其他


#include<stdio.h>
int mystrlen(char* str) {
	if(*str!='\0')
	{
		return (1 + mystrlen(str+1));
	}
	return 0;
}
int main() {
	char arr[] = "asfsad";
	int sz = mystrlen(arr);//数组传参,是将首元素的地址传过去。
	printf("%d", sz);
	return 0;
}



版权声明:本文为weixin_45275802原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_45275802/article/details/112427147

你可能也喜欢

Datatables中文API——基本参数

根据流程实例 ID 获取当前活动任务id

使用XGBoost进行时间序列预测流程代码

React Native 实现登录注册二

求1000以内的所有完数

原型与原型链

ECharts 联动效果

剑指offer 按之字形顺序打印二叉树(C++)

Nginx服务器设置http/https正向代理,使用ngx_http_proxy_connect_module模块

C语言中位段实际运用

PageRank学习

用jQuery制作动态时钟

姿态解算系列一:经验型卡尔曼数据融合

typedef struct 用法详解和用法小结 及 在C和C++中的区别

Spring中自定义注解不生效的问题

2022ccpc河北省赛9-优美字符串+DP

Bartender Print portal web端打印

信息收集总结—vulnstack1

计算机网络

EasyCVR通道收藏的功能拓展

目录

  • APICloud (3)
  • golang (228)
  • java (8,236)
  • linux (4,002)
  • mysql (2,800)
  • php (1,070)
  • python (5,439)
  • solidity (25)
  • uniapp (235)
  • vue (2,463)
  • 其他 (88,233)
  • 小程序 (801)

文章归档

  • 2023年十二月 (1872)
  • 2023年十一月 (477)
  • 2023年十月 (17371)
  • 2023年九月 (44974)
  • 2023年八月 (26399)
  • 2023年七月 (14793)
  • 2023年六月 (1)
  • 2023年五月 (2186)
  • 2023年四月 (3838)
  • 2023年三月 (1544)
  • 2023年二月 (3)
  • 2023年一月 (4)
  • 2022年十二月 (3)
  • 2022年十一月 (36)
  • 2022年十月 (16)
  • 2022年九月 (8)
  • 2021年九月 (1)
  • 2020年九月 (6)
  • 2020年八月 (5)

标签

Aave (1) cosmos (6) defi (255) flag (27) gitee (1) github (1) golang (234) java (8234) linux命令 (82) List (1) map (1115) mysql (3093) npm (237) tendermint (6) uuid (43) vant (64) vmware (270) 区块链 (63) 合约 (37) 小程序版本更新 (3)
  • 首页
  • 小程序
  • uniapp
  • vue
  • APICloud
  • 其他
Copyright xfxia.com 鲁ICP备19024253号-2
关闭菜单