数据结构 串的堆分配存储表示的c语言程序表示

[复制链接]
查看11 | 回复1 | 2012-11-20 15:54:32 | 显示全部楼层 |阅读模式
没写清楚需求啊‘求字串’是什么意思?可以用库函数不?刚回错地方了,好像:求串长,strlen(str),连接strcat(s1,s2),求字串strstr(s1,s2)程序代码:int main(void){
char s1[] = "if youwant someshing";
char s2[] = “please do something”;
char substring[64];
int ret = 0;
// 串长
printf("len of s1 is %d, len of s2 is %d.\n", sizeof(s1), sizeof(s2));
//...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行