ImageVerifierCode 换一换
格式:DOC , 页数:130 ,大小:1.69MB ,
资源ID:6709977      下载积分:10 金币
快捷注册下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/6709977.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

注意事项

本文(二级C语言机试题目.doc)为本站上传会员【xrp****65】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

二级C语言机试题目.doc

1、 校园网·新视野教育二级C上机考试复习资料 V16.0 (共50套题目) 第1套 校园网·新视野教育上机考试复习资料 1、程序填空题 #include #include double fun(double x) { double f, t; int n; f = 1.0 + x; /**********found**********/ t = ___1___; n = 1; do { n++; /**********found**********/

2、 t *= (-1.0)*x/___2___; f += t; } /**********found**********/ while (___3___ >= 1e-6); return f; } main() { double x, y; x=2.5; y = fun(x); printf("\nThe result is :\n"); printf("x=%-12.6f y=%-12.6f\n", x, y); } 2、程序修改题 #include long f

3、un(int x,int y,long *p ) { int i; long t=1; /**************found**************/ for(i=1; i

4、 t=fun(x,y,&r); printf("\n\nx=%d, y=%d, r=%ld, last=%ld\n\n",x, y,r,t ); } 3、程序设计题 校园网·新视野教育上机考试复习资料 #include #include double fun(double x) { } main() { double x,s; printf("Input x: "); scanf("%lf",&x); s=fun(x); printf("s=%f\n",s); }

5、 第2套 校园网·新视野教育上机考试复习资料 1、程序填空题 #include int c1,c2,c3; void fun(long n) { c1 = c2 = c3 = 0; while (n) { /**********found**********/ switch(___1___) { /**********found**********/ case 1: c1++;___2___; /**********found**********/ case

6、 2: c2++;___3___; case 3: c3++; } n /= 10; } } main() { long n=123114350L; fun(n); printf("\nThe result :\n"); printf("n=%ld c1=%d c2=%d c3=%d\n",n,c1,c2,c3); } 2、程序修改题 校园网·新视野教育上机考试复习资料 #include int fun(unsigned n, int *zero)

7、 { int count=0,max=0,t; do { t=n%10; /**************found**************/ if(t=0) count++; if(max

8、\nInput n(unsigned): "); scanf("%d",&n); max = fun( n,&zero ); printf("\nThe result: max=%d zero=%d\n",max,zero); } 3、程序设计题 校园网·新视野教育上机考试复习资料 #include double fun(int n) { } main() { int n; double s; printf("\nInput n: "); scanf("%d",&n); s=fun(n

9、); printf("\n\ns=%f\n\n",s); } 第3套 校园网·新视野教育上机考试复习资料 1、程序填空题 #include unsigned long fun(unsigned long n) { unsigned long x=0; int t; while(n) { t=n%10; /**********found**********/ if(t%2==__1__) /**********found**********/ x=__2__+t; /*******

10、found**********/ n=__3__; } return x; } main() { unsigned long n=-1; while(n>99999999||n<0) { printf("Please input(0 void fun (long s

11、 long *t) { int d; long sl=1; /************found************/ t = 0; while ( s > 0) { d = s%10; /************found************/ if (d%2 == 0) { *t = d * sl + *t; sl *= 10; } s /= 10; } } main() { long s, t; printf("\nPlease enter s:"); scanf(

12、"%ld", &s); fun(s, &t); printf("The result is: %ld\n", t); } 3、程序设计题 校园网·新视野教育上机考试复习资料 #include void fun(char p1[], char p2[]) { } main() printf("Enter s1 and s2:\n") ; scanf("%s%s", s1, s2) ; printf("s1=%s\n", s1) ; printf("s2=%s\n

13、", s2) ; printf("Invoke fun(s1,s2):\n") ; fun(s1, s2) ; printf("After invoking:\n") ; printf("%s\n", s1) ; } 第4套 校园网·新视野教育上机考试复习资料 1、程序填空题 #include #define M 3 #define N 4 void fun(int (*a)[N]) { int i=0,j,find=0,rmax,c,k; while( (i

14、

15、 } if(find) printf("find: a[%d][%d]=%d\n",i,c,a[i][c]); /**********found**********/ __3__ ; } if(!find) printf("not found!\n"); } main() { int x[M][N],i,j; printf("Enter number for array:\n"); for(i=0; i

16、"The array:\n"); for(i=0; i double fun ( int m ) { double y = 1.0 ; int i ; /**************found**************/ for(i = 2 ; i < m

17、 i++) /**************found**************/ y -= 1 /(i * i) ; return( y ) ; } main( ) { int n = 5 ; printf( "\nThe result is %lf\n", fun ( n ) ) ; } 3、程序设计题 校园网·新视野教育上机考试复习资料 #include #include int fun(int score[], int m, int below[]) {

18、 } main( ) int score[9] = {10, 20, 30, 40, 50, 60, 70, 80, 90} ; n = fun(score, 9, below) ; printf( "\nBelow the average score are: " ) ; for (i = 0 ; i < n ; i++) printf("%d ", below[i]) ; } 第5套 校园网·新视野教育上机考试复习资料 1、程序填空题 #include #include

19、h> #define N 5 #define M 10 /**********found**********/ void fun(char (*ss) __1__, int k) { int i=0 ; /**********found**********/ while(i< __2__) { /**********found**********/ ss[i][k]=__3__; i++; } } main() { char x[N][M]={"Create","Modify","Sort","skip","Delete"};

20、 int i; printf("\nThe original string\n\n"); for(i=0;i #include double fun(double

21、 eps) { double s,t; int n=1; s=0.0; /************found************/ t=0; while( t>eps) { s+=t; t=t * n/(2*n+1); n++; } /************found************/ return(s); } main() { double x; printf("\nPlease enter a precision: "); scanf("%lf",&x);

22、 printf("\neps=%lf, Pi=%lf\n\n",x,fun(x)); } 3、程序设计题 校园网·新视野教育上机考试复习资料 #include void fun( char *a, int n ) { /* 以下代码仅供参考 */ int i=0,j,k=0; while(a[k]=='*') k++; /* k为统计*字符个数 */ if(k>n) { i=n;j=k; /* 以下完成将下标为k至串尾的字符前移k-n个位置 */ } } mai

23、n() printf("Enter a string:\n");gets(s); printf("Enter n : ");scanf("%d",&n); fun( s,n ); printf("The string after deleted:\n");puts(s); } 第6套 校园网·新视野教育上机考试复习资料 1、程序填空题 #include #define N 4 /**********found**********/ void fun(int (*t)___1___ )

24、{ int i, j; for(i=1; i

25、nThe original array:\n"); for(i=0; i

26、上机考试复习资料 #include #include #include /************found************/ #define FU(m,n) (m/n) float fun(float a,float b,float c) { float value; value=FU(a+b,a-b)+FU(c+b,c-b); /************found************/ Return(Value); } main() { float x,y,z,

27、sum; printf("Input x y z: "); scanf("%f%f%f",&x,&y,&z); printf("x=%f,y=%f,z=%f\n",x,y,z); if (x==y||y==z){printf("Data error!\n");exit(0);} sum=fun(x,y,z); printf("The result is : %5.2f\n",sum); } 3、程序设计题 校园网·新视野教育上机考试复习资料 #include void fun( char *a )

28、 { } main() { char s[81]; printf("Enter a string:\n");gets(s); fun( s ); printf("The string after deleted:\n");puts(s); } 第7套 校园网·新视野教育上机考试复习资料 1、程序填空题 #include #define N 3 #define M 4 /**********found**********/ void fun(int (*a)[N], int _

29、1__) { int i,temp ; /**********found**********/ for(i = 0 ; i < __2__ ; i++) { temp=a[0][i] ; /**********found**********/ a[0][i] = __3__ ; a[k][i] = temp ; } } main() { int x[M][N]={ {1,2,3},{4,5,6},{7,8,9},{10,11,12} },i,j; printf("The array before moving:\n\n"); fo

30、r(i=0; i

31、include void fun( char t[] ) { char c; int i, j; /**********found***********/ for( i = strlen( t ); i; i-- ) for( j = 0; j < i; j++ ) /**********found***********/ if( t[j] < t[ j + 1 ] ) { c = t[j]; t[j] = t[ j + 1 ]; t[j + 1 ]

32、 c; } } main() { char s[81]; printf( "\nPlease enter a character string: " ); gets( s ); printf( "\n\nBefore sorting:\n \"%s\"", s ); fun( s ); printf( "\nAfter sorting decendingly:\n \"%s\"\n", s ); } 3、程序设计题 校园网·新视野教育上机考试复习资料 #include #include

33、tring.h> void fun( char *ss ) { } void main( void ) { printf( "\nPlease enter an character string within 50 characters:\n" ); gets( tt ); printf( "\n\nAfter changing, the string\n \"%s\"", tt ); fun(tt) ; printf( "\nbecomes\n \"%s\"", tt ); } 第8套 校园网·新视野

34、教育上机考试复习资料 1、程序填空题 #include int fun(int x) { int n, s1, s2, s3, t; n=0; t=100; /**********found**********/ while(t<=__1__){ /**********found**********/ s1=t%10; s2=(__2__)%10; s3=t/100; /**********found**********/ if(s1+s2+s3==__3__) { printf("%d "

35、t); n++; } t++; } return n; } main() { int x=-1; while(x<0) { printf("Please input(x>0): "); scanf("%d",&x); } printf("\nThe result is: %d\n",fun(x)); } 2、程序修改题 校园网·新视野教育上机考试复习资料 #include /************found************/ void fun (long s,

36、 long t) { long sl=10; s /= 10; *t = s % 10; /************found************/ while ( s < 0) { s = s/100; *t = s%10*sl + *t; sl = sl * 10; } } main() { long s, t; printf("\nPlease enter s:"); scanf("%ld", &s); fun(s, &t); printf("The

37、result is: %ld\n", t); } 3、程序设计题 校园网·新视野教育上机考试复习资料 #include #define N 16 typedef struct { char num[10]; int s; } STREC; void fun( STREC a[] ) { STREC tmp; int i,j; for(i = 0; i < N; i++) for(j = i+1; j < N; j++) { /* 请按题目要求完成以下代码 */

38、 } } main() { STREC s[N]={{"GA005",85},{"GA003",76},{"GA002",69},{"GA004",85}, {"GA001",91},{"GA007",72},{"GA008",64},{"GA006",87}, {"GA015",85},{"GA013",91},{"GA012",64},{"GA014",91}, {"GA011",66},{"GA017",64},{"GA018",64},{"GA016",72}}; int i;FILE *out ; fun( s ); p

39、rintf("The data after sorted :\n"); for(i=0;i

40、 } fprintf(out,"\n"); fclose(out) ; } 第9套 校园网·新视野教育上机考试复习资料 1、程序填空题 #include #define N 4 fun(int t[][N], int n) { int i, sum; /**********found**********/ ___1___; for(i=0; i

41、i=0; i

42、"); } printf("The result is: %d",fun(t,N)); } 2、程序修改题 校园网·新视野教育上机考试复习资料 #include #include double funx(double x) { return(2*x*x*x-4*x*x+3*x-6); } double fun( double m, double n) { /************found************/ int r; r=(m+n)/2; /**********

43、found************/ while(fabs(n-m)<0.001) { if(funx(r)*funx(n)<0) m=r; else n=r; r=(m+n)/2; } return r; } main( ) { double m,n, root; printf("Enter m n : \n"); scanf("%lf%lf",&m,&n); root=fun( m,n ); printf("root = %6.3f\n",root); } 3、程序设计题 校园网

44、·新视野教育上机考试复习资料 #include void fun( char *a, char *h,char *p ) { } main() { char s[81],*t, *f; printf("Enter a string:\n");gets(s); t=f=s; while(*t)t++; t--; while(*t=='*')t--; while(*f=='*')f++; fun( s , f,t ); printf("The string after delete

45、d:\n");puts(s); } 第10套 校园网·新视野教育上机考试复习资料 1、程序填空题 #include /**********found**********/ ___1___ fun(char ch) { /**********found**********/ if (ch>='0' && ___2___) /**********found**********/ return '9'- (ch-___3___); return ch ; } main() { char c1

46、 c2; printf("\nThe result :\n"); c1='2'; c2 = fun(c1); printf("c1=%c c2=%c\n", c1, c2); c1='8'; c2 = fun(c1); printf("c1=%c c2=%c\n", c1, c2); c1='a'; c2 = fun(c1); printf("c1=%c c2=%c\n", c1, c2); } 2、程序修改题 校园网·新视野教育上机考试复习资料 #include v

47、oid fun(char *p, char *b) { int i, k=0; while(*p) { i=1; while( i<=3 && *p ) { /**********found**********/ b[k]=p; k++; p++; i++; } if(*p) { /**********found**********/ b[k++]=" "; } } b[k]='\0'; } main()

48、 { char a[80],b[80]; printf("Enter a string: "); gets(a); printf("The original string: "); puts(a); fun(a,b); printf("\nThe string after insert space: "); puts(b); printf("\n\n"); } 3、程序设计题 校园网·新视野教育上机考试复习资料 #include #include #define N

49、8 struct slist { double s; struct slist *next; }; typedef struct slist STREC; double fun( STREC *h ) { } STREC * creat( double *s) { STREC *h,*p,*q; int i=0; h=p=(STREC*)malloc(sizeof(STREC));p->s=0; while(is=s[i

50、]; i++; p->next=q; p=q; } p->next=0; return h; } outlist( STREC *h) { STREC *p; p=h->next; printf("head"); do { printf("->%4.1f",p->s);p=p->next;} while(p!=0); printf("\n\n"); } main() { double s[N]={85,76,69,85,91,72,64,87},ave; STREC *h; h=creat( s );

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服