#include "stdio.h"#include "conio.h"#include "string.h"void prochar(char *str,char c){ char *p; for(p=str;*p!='\0';p++) if(*p!=c) *str++=*p; *str='\0';}void main(){ char ... Read More
posted @ 2007-01-19 21:51 齐心 Views(2396) Comments(0) Diggs(0) Edit
1、形参采用指针 #include "stdio.h"#include "conio.h"#include "string.h"void main(){ int i,radix; long n; char a[33]; void trans10_2_8_16(char *p,long m,int base); printf("\nInput radix(2,8,16)... Read More
posted @ 2007-01-19 17:27 齐心 Views(21432) Comments(0) Diggs(1) Edit
1、用数组名常量指针输出二维数组,并将数组中的最大元素及所在行列号输出 #include "stdio.h"#include "conio.h"void main(){ int i,j,m,n,max; int a[3][4]={1,2,3,4,5,6,7,8,9,10,11,12}; m=0;n=0; max=**a; ... Read More
posted @ 2007-01-19 13:54 齐心 Views(553) Comments(0) Diggs(1) Edit
#include "stdio.h"#include "conio.h"void main(){ static int a[5]={1,3,5,7,9}; int i,*p; for(i=0;i<5;i++) printf("%4d",a[i]); /**//*方法1:下标法*/ putchar('\n'); for(i=0;i<5;i... Read More
posted @ 2007-01-19 09:03 齐心 Views(842) Comments(0) Diggs(1) Edit