c程题目求解答516.编写函数voidfun(char*str),将参数字符串中各单词首字母变大写,其余字母变小写.输入输出在main中实现.如输入"youHAVE10books,don'tyou?"输出"YouHave10Books,Don'tYou?".单词以空格
c程题目求解答5
16.编写函数voidfun(char*str),将参数字符串中各单词首字母变大写,其余字母变小写.输入输出在main中实现.如输入"youHAVE10books,don'tyou?"输出"YouHave10Books,Don'tYou?".单词以空格、逗号、句号分隔.
#include
voidfun(char*str)
{
}
main()
{chara[100];
gets(a);
fun(a);
puts(a);
}
17.n个整数,前面各数循环顺序后移m个位置,最后m个数变成最前面m个数.写函数voidfun(int*p,intn,intm),实现上述功能.在main()中输入与输出.如下面程序输出78910123456.注意,m可能大于n.
#include"stdio.h"
voidfun(int*p,intn,intm)
{
}
main()
{voidfun(int*,int,int);
intx[10]={1,2,3,4,5,6,7,8,9,10},i;
fun(x,10,14);
for(i=0;i