C语言习题集及答案 1

2026/4/24 3:39:45

printf(\ }

11、

char cchar(char ch)

{ if (ch>=‘A’&&ch<=‘Z')

ch=ch-‘A'+‘a';

return ch; }

void main()

{ char s[]=\ while(*p) { *p=cchar(*p); p++; }

printf(\ }

12、

void main( )

{ int a[5]={2,4,6,8,10},*p,* *k; p=a; k=&p;

printf(\ printf(\ }

13、

funa(int a,int b ) { return a+b;} funb(int a,int b ) { return a-b;} sub( int (*t)( ),int x,int y ) { return ((*t)(x,y));} void main( ) { int x ,(*p)( ); p=funa; x=sub(p,9,3); x+=sub(funb,8,3); printf(\

}

48

14、

void main( )

{ char *s=\int v[4]={0,0,0,0} ; int k,i;

for(k=0;s[k];k++) { switch(s[k]) { case '1':i=0; case '2':i=1; case '3':i=2; case '4':i=3; } v[i]++; }

for(k=0;k<4;k++) printf(\}

void space(char *str) { int i ,t ; char ts[81];

for(i=0,t=0 ;str[i]!='\\0' ;i+=2)

if(! isspace(*(str+i))&&(*(str+i)!='a')) ts[t++]=toupper(str[i]) ; ts[t]='\\0' ; strcpy(str ,ts) ; }

void main( )

{ char s[81]={\ space(s); puts(s); }

#include

sub1(char a ,char b) { char c ; c=a ;a=b ;b=c ;} sub2(char * a ,char b) { char c ; c=*a ;*a=b ;b=c ;} sub3(char * a ,char *b){ char c ; c=*a ;*a=*b ;*b=c ;} void main()

49

15、# include \

16、


C语言习题集及答案 1.doc 将本文的Word文档下载到电脑
搜索更多关于: C语言习题集及答案 1 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219