浙江自考网

咨询热线

15700080354 (点击在线咨询)
您现在的位置:浙江自考网>自考模拟题 > 正文
自考攻略

2022年10月浙江自考《C语言程序设计》模拟题(八)

时间:2022-10-08 15:30:42 作者:储老师

自考助学   以下自考模拟题均由浙江自考网整理并发布,考生想要了解更多关于浙江自考报名、考试、成绩查询、毕业、历年真题、常见问答等相关信息请关注浙江自考网,获取浙江自考更多信息。


  11.下面程序的输出结果是____。

  #include

  main( )

  { int n[3][3], i, j;

  for(i=0;i<3;i++ )

  for(j=0;j<3;j++ )

  n[i][j]=i+j;

  for(i=0;i<2;i++ )

  for(j=0;j<2;j++ )

  n[i+1][j+1]+=n[i][j];

  printf("%dn", n[i][j]);

  }

  A) 14 B) 0 C) 6 D) 不确定

  12.下面程序的输出结果是____。

  #include

  main( )

  { int a[4][5]={1,2,4,-4,5,-9,3,6,-3,2,7,8,4};

  int i,j,n;

  n=9;

  i=n/5;

  j=n-i*5-1;

  printf("a[%d][%d]=%dn", i,j,a[i][j]);

  }

  A) 6 B) -3 C) 2 D) 不确定

  13.下面程序的输出结果是____。

  #include

  main( )

  { char s1[50]={"some string *"},s2[]={"test"};

  printf("%sn", strcat(s1,s2));

  }

  A) some string * B) test

  C) some stritest D) some string *test

  14.下面程序的输出结果是____。

  #include

  f(char *s)

  { char *p=s;

  while(*p!='0')

  p++;

  return(p-s);

  }

  main()

  { printf("%dn",f("ABCDEF"));

  }

  A) 3 B) 6 C) 8 D) 0

  15.下面程序的输出结果是____。

  #include

  #include

  main( )

  { char str[100] ="How do you do";

  strcpy( str + strlen(str)/2, "es she");

  printf("%sn", str);

  }

  A) How do you do B) es she

  C) How are you D) How does she

  16.下面程序的输出结果是____。

  #include

  func(int a,int b)

  { int c;

  c=a+b;

  return(c);

  }

  main()

  { int x=6,y=7,z=8,r;

  r=func((x--,y++,x+y),z--);

  printf("%dn",r);

  }

  A) 11 B) 20 C) 21 D) 31

  17.下面程序的输出结果是____。

  main()

  { int a[]={1,2,3,4,5,6};

  int *p;

  p=a;

  printf("%d ",*p);

  printf("%d ",*(++p));

  printf("%d ",*++p);

  printf("%d ",*(p--));

  p+=3;

  printf("%d %d ",*p,*(a+3));

  }

  A) 1 2 3 3 5 4 B) 1 2 3 4 5 6 C) 1 2 2 3 4 5 D) 1 2 3 4 4 5

  18.下面程序的输出结果是____。

  #include

  main ( )

  { int a[]={1, 2, 3, 4, 5} ;

  int x, y, *p;

  p=&a[0];

  x=*(p+2);

  y=*(p+4);

  printf("%d,%d,%dn", *p, x, y);

  }

  A) 1,3,5 B) 1,2,3 C) 1,2,4 D) 1,4,5

  19.下面程序的输出结果是____。

  #include "string.h"

  fun(char *w,int n)

  { char t,*s1,*s2;

  s1=w;s2=w+n-1;

  while(s1

  { t=*s1++;

  *s1=*s2--;

  *s2=t;

  }

  }

  main()

  { static char *p="1234567";

  fun(p,strlen(p));

  printf("%s",p);

  }

  A) 7654321 B) 1717171 C) 7171717 D) 1711717

  20.下面程序的输出结果是____。

  #include

  char *p = "abcdefghijklmnopq" ;

  main( )

  { int i=0;

  while( *p++!='e' );

  printf("%cn", *p);

  }

  A) c B) d C) e D) f

声明:

(一)由于考试政策等各方面情况的不断调整与变化,本网站所提供的考试信息仅供参考,请以权威部门公布的正式信息为准。

(二)本网站在文章内容来源出处标注为其他平台的稿件均为转载稿,免费转载出于非商业性学习目的,版权归原作者所有。如您对内容、版权等问题存在异议请与本站联系,我们会及时进行处理解决。

报名提醒

【考试时间:4月12-13日】

浙江自考服务中心

  • 微信公众号
  • 考生交流群
  • 微信公众号 扫一扫加关注微信公众号

    与考生自由互动、并且能直接与专业老师进行交流解答。

  • 考生交流群 扫一扫加入微信交流群

    与考生自由互动、并且能直接与专业老师进行交流解答。

关注公众号

回复“免费资料”领取复习资料

微信公众号

微信公众号

微信公众号

微信交流群

<<点击收起

在线咨询

在线咨询

APP

APP
下载

man
联系
微信
wxlogo
扫描
二维码
反馈建议
反馈
建议
回到顶部
回到
顶部
app
微信客服
 微信公众号