C语言程序设计F卷

小微 科技C语言程序设计F卷已关闭评论106字数 1272阅读模式
摘要考试试卷(F卷)——标 准 答 案计算机程序设计 课程 56 学时 3.5 学分 考试形式: 闭 卷一、选择题(15小题,每一一小题2分,共计30分)1.下面不正确的字符串常量是 ...

考试试卷(F卷)

——标 准 答 案文章源自微观生活(93wg.com)微观生活-https://93wg.com/2600.html

计算机程序设计 课程 56 学时 3.5 学分 考试情势: 闭 卷文章源自微观生活(93wg.com)微观生活-https://93wg.com/2600.html

一、选择题(15小题,每一小题2分,总计30分)文章源自微观生活(93wg.com)微观生活-https://93wg.com/2600.html

1.下面不正确的字符串常量是 A 。文章源自微观生活(93wg.com)微观生活-https://93wg.com/2600.html

A)&39; B)&39;12&34;0&34; &39;A&39;6&39;3&39;a&39;b&39;\\0&39;c&39;\\0&include<stdio.h>文章源自微观生活(93wg.com)微观生活-https://93wg.com/2600.html

Int main文章源自微观生活(93wg.com)微观生活-https://93wg.com/2600.html

{ int a=23389,b=45;float x=647.3586,y=13643.5538;文章源自微观生活(93wg.com)微观生活-https://93wg.com/2600.html

char c1=’A’,c2[]=&34;;文章源自微观生活(93wg.com)微观生活-https://93wg.com/2600.html

printf;文章源自微观生活(93wg.com)微观生活-https://93wg.com/2600.html

printf;文章源自微观生活(93wg.com)微观生活-https://93wg.com/2600.html

printf;

printf;

printf;

return 0;

}

a

=

2

3

3

8

9

,

b

=

4

5

6

4

7

.

3

6

,

1

3

6

4

3

.

5

5

5

5

,

2

d

,

4

5

6

5

,

A

H

e

l

l

o

,

H

e

l

l

2.define N 10

int main

{ int a=1,b=0, i;

for

{ printf;

printf;

a=b+a;

b=a+b;}

return 0;}

1

0

1

1

2

3

5

8

1

3

2

1

3.include<stdio.h>

int main

{ int i=16,j,x=6,y,z;static char c[]=”I am a student”;

j=i+++1; printf;

x*=i=j; printf;

x=1,y=2,z=3;

x+=y+=z;

printf>y? z++:y++);

x=y=z=-1;

++x||++y||z++;

printf;

printf;

return 0;

}

1

7

1

0

2

9

0

0

0

I

a

m

a

s

t

u

d

e

n

t

,

I

a

m

四、程序填空(每一空1.5分,总计15分)

1.下面程序的功能是:将字符数组s2中的全体字符拷贝到字符数组s1中,不用strcpy函数。

include <stdio.h>

int main

{ int a[20],i,max,min,sum;

printf;

for

scanf;

max=a[0]; min=a[0]; sum= a[0] ;

for

{ if max=a[i];

if min=a[i] ;

sum+=a[i];

}

printf;

return 0;

}

3.输入一行字符到字符数组中,将其中的小写字母转化成大写字母,大写字母转化成小写字母,然后输出。

include <string.h>

main

{ char c,str[80];

int i;

gets;

for!= ’\\0’ ;i++)

{ if c=c+32;

else if c=c-32;

str[i]=c; }

puts;

return 0;

}

五、编写程序(每一小题10分,总计20分)

(注意:可做在试卷反面)

1.输出100到300之间能被5整除了却不能被3整除了的所有数之以及。

include <stdio.h>

int main

{ long int fun;

long res, res1, res2, res3,m, n;

scanf;

res1=fun; res2=fun; res3=fun;

res=res1/;

printf;

return 0;

}

long int fun;

{ long int i, res=1;

for

res *= i;

return;

}

以上就是微观生活(93wg.com)关于“C语言程序设计F卷”的详细内容,希望对大家有所帮助!

继续阅读
 
小微
  • 版权声明: 本文部分文字与图片资源来自于网络,转载此文是出于传递更多信息之目的,若有来源标注错误或侵犯了您的合法权益,请立即通知我们(管理员邮箱:81118366@qq.com),情况属实,我们会第一时间予以删除,并同时向您表示歉意,谢谢!
  • 转载请务必保留本文链接:https://93wg.com/2600.html