2022年湖南省长沙市全国计算机等级考试C语言程序设计预测试题(含答案).docxVIP

  • 2
  • 0
  • 约2.06万字
  • 约 40页
  • 2023-06-07 发布于河北
  • 举报

2022年湖南省长沙市全国计算机等级考试C语言程序设计预测试题(含答案).docx

2022年湖南省长沙市全国计算机等级考试C语言程序设计预测试题(含答案) 学校:________ 班级:________ 姓名:________ 考号:________ 一、单选题(20题) 1. 2.有以下程序: #include <stdio.h> main() {char *s=“01234”; while(*(++s)!=‘\0’) {switch(*s -‘0’) {case 0: case 1: putchar(*s+1); break; case 2: putchar(*s+1); break; case 3: putchar(*s+1); default: putchar(*s+1); break; } } } 程序运行后的输出结果是()。 A.22345 B.2345 C.12345 D.23445? 3. 若输入“abcdef”、“abdef”,以下程序的输出结果为( )。 #include<stdio.h> #lnclude<string.h> main() {int n; char s1[20],s2[20],p1,*p2; scanf(%s,s1); scanf(%s,s2); P1=s1; p2=s2; n=strcmp(p1,p2); printf(%d\n,n);} A.-1 B.0 C.abcdef D.abdef? 4.算法分析的

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档