排序
在字符串str中找出最大的字符
编写一个程序实现以下功能:在字符串str中找出最大的字符并放在第一个位置上,并将该字符前的原字符往后顺序移动,如 chyab变成ychab。 #include 'stdio.h'#include 'conio.h'#include 'st...
统计字符串中特定字符的个数
从键盘输入一串字符串,统计字符串中特定字符的个数(特定字符也需要从键盘输入),并输出个数。 #include 'stdio.h'#include 'conio.h'#include 'string.h'void main(){ char s[100],ch...
把输入的4个数字字符
编写一函数,把输入的4个数字字符转换成int数据存放。 法一:#include 'stdio.h'int f(char x){ return (x-48);}void main(){ char a,b,c,d; int x,y,z,t; printf('请输入4个数字字符...
指针变量将1个字符数组中的字符倒序输出
编写一个程序通过指针变量将1个字符数组中的字符倒序输出。 #include 'stdio.h'#include 'conio.h'#define MAXLEN 25void main( ){ char s[MAXLEN],*p; int i,j; printf('Please input a...