排序
统计数组a中所有偶数的个数
以下程序的功能是统计数组a中所有偶数的个数。 #include 'stdio.h' void main( ) {int a[10],*p,sum=0; printf('请输入10个整数:'); for(p=a;p < a+10;p++) scanf('%d',...
指针变量找出一维数组中的最大值和最小值
编写一个程序通过指针变量找出一维数组中的最大值和最小值,并交换最大值与最小值的位置。 #include 'stdio.h'#include 'conio.h'#define N 5void main( ){ int a[N],*pmax,*pmin,...
指针变量将1个字符数组中的字符倒序输出
编写一个程序通过指针变量将1个字符数组中的字符倒序输出。 #include 'stdio.h'#include 'conio.h'#define MAXLEN 25void main( ){ char s[MAXLEN],*p; int i,j; printf('Please input a...