科大讯飞笔试题

删除字符串的_标志位,例如_ddw_scs_,变成ddwscs
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void main(){
    char str[100];
	gets(str);
	//char str[] = { '_', 'H', 'e', '_', 'l', 'l', 'o', '!', '\0' };
	printf("字符串长度:%d\n", strlen(str));
	int _count = 0;
	for (int i = 0; i < strlen(str); i++){
		if (str[i] == '_'){
			_count++;
			for (int j = i + 1; j <= strlen(str) - i + 1; j++){
				str[j - 1] = str[j];
			}
		}
	}
	//最后没有移动的位置设置为结束符'\0'
	str[strlen(str) - _count + 1] = '\0';
	printf("修改后的字符串为:%s\n", str);
         
}


#科大讯飞##笔试题目#
全部评论
害在这做讯飞的题目了 没必要了  别个估计都招完了 很多人笔试做完都没面试机会
点赞 回复 分享
发布于 2020-09-27 10:22
科大讯飞还招人吗?大半个月前的笔试AK了也没见他发起面试。
点赞 回复 分享
发布于 2020-09-27 10:00
还有个排序  常见题不贴了
点赞 回复 分享
发布于 2020-09-27 09:37

相关推荐

迷茫的大四🐶:哇靠,哥们,啥认证啊,副总裁实习,这么有实力嘛
一起聊美团
点赞 评论 收藏
分享
评论
点赞
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务