随笔分类 -  C语言

摘要:一、重写函数 Action(){ //重写strupr,小写变大写 char *desc; char *str="123abcd*"; desc=(char *)malloc(100*sizeof(char)); fun_reStrupr(str,desc); lr_message("%s",des 阅读全文
posted @ 2017-06-14 16:48 Elsa-软件测试工程师 阅读(966) 评论(0) 推荐(0)
摘要:Action() { //统计字符019aBcd8***,4,4,3 int i,z,t; char *str="019aBcd8***"; fun_Count(str,i,z,t); lr_output_message("存在数字%d 存在字母%d 存在特殊字符%d",i,z,t);//输出000 阅读全文
posted @ 2017-06-13 16:25 Elsa-软件测试工程师 阅读(488) 评论(0) 推荐(0)
摘要://实现对一个字符串的删除重复的字符,并输出删除后的字符串,(如从”testroadeasy”中输出”tesroady”) Action(){ char *str="testroadeasy"; char *desc; desc=(char *)malloc(100*sizeof(char)); f 阅读全文
posted @ 2016-08-08 23:12 Elsa-软件测试工程师 阅读(2487) 评论(0) 推荐(0)
摘要:度娘的思路 Action() { //实现1-2+3-4+5……+99-100的值 //20160802 int i,tag,sum; sum=0; tag=1; for(i=1;i<=100;i++) { sum+=i*tag; tag=-tag; } lr_output_message ("%d 阅读全文
posted @ 2016-08-03 22:37 Elsa-软件测试工程师 阅读(787) 评论(0) 推荐(0)
摘要:方法1: Action(){//倒序输出 char *src="abcdefgh123"; char *desc; desc=(char *)malloc(100*sizeof(char)); fun_reverse(src,desc);//调用 lr_output_message ("%s",de 阅读全文
posted @ 2016-08-03 09:27 Elsa-软件测试工程师 阅读(4097) 评论(0) 推荐(0)