1. C璇瑷绋嬪簭濉绌猴紝鏈夐敊浣嗕笉鐭ラ亾閿欏湪鍝銆傚嚱鏁皌est1鍔熻兘涓猴細鍦ㄥ瓧绗︿覆a涓鐨勬瘡涓灏忓啓瀛楁瘝鍚庨潰鎻掑叆瀛楃ch
绗浜屼釜绌轰笉瀵癸紝搴旇ユ槸a[i+1]=ch;
鎵浠ユ暣涓绋嬪簭鏄锛
#include"stdio.h"
#include"string.h"
voidtest1(chara[],charch){
inti,j,n=strlen(a);
for(i=0;i<n;i++){
if(a[i]>='a'&&a[i]<='z'){
for(j=n;j>i+1;j--)
a[j]=a[j-1];/*...............................................1*/
a[i+1]=ch;/*....................................2*/
n=n+1;}/*..............................................3*/
}
puts(a);
}
main(){
chars[80];
gets(s);
test1(s,'*');
}