c语言改错题 在线等大神回复

[复制链接]
查看11 | 回复4 | 2013-5-26 22:18:25 | 显示全部楼层 |阅读模式
#include #include"stdio.h"#includechar*subs(char *s, int n, int m){char *p;int i=0;//i要初始化p=s;//p是指针while(*p++!='\0')i++;if(ni){printf("Substring invidal!\n");exit(0);}p=s;*(p+m+1)='\0';//如果是得到第n到第m个字符就将这句移到下...
回复

使用道具 举报

千问 | 2013-5-26 22:18:25 | 显示全部楼层
#include"stdio.h"#include#include char*subs(char* s, int n, int m){ char *p;int i = 0;p = s;while(*p!=NULL){
i++; p++;}...
回复

使用道具 举报

千问 | 2013-5-26 22:18:25 | 显示全部楼层
你这个函数形参s是个变量,可你使用的时候是个指针类型,编译肯定报错了。exit()和clrscr()没有加载相应头文件。主函数没有返回值。...
回复

使用道具 举报

千问 | 2013-5-26 22:18:25 | 显示全部楼层
char*subs(char *s, int n, int m)...
回复

使用道具 举报

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

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行