若程序执行时的输入数据是"2473",则下述程序的输出结果是includevoid main(){int cs;w若程序执行时的输入数据是"2473",则下述程序的输出结果是 #include<stdio.h> void main() { int cs; while((cs=getchar())!=,'\n') {switch(cs='2') { case0 case 1:putchar(cs+4); case 2:putchar(cs+4); break; case 3:putchar(cs+3);de

题目
若程序执行时的输入数据是"2473",则下述程序的输出结果是includevoid main(){int cs;w

若程序执行时的输入数据是"2473",则下述程序的输出结果是 #include<stdio.h> void main() { int cs; while((cs=getchar())!=,'\n') {switch(cs='2') { case0 case 1:putchar(cs+4); case 2:putchar(cs+4); break; case 3:putchar(cs+3);default:putchar(cs+2);}}}

A.668977

B.668966

C.6677877

D.6688766


相似考题
更多“若程序执行时的输入数据是"2473",则下述程序的输出结果是#include<stdio.h>void main(){int cs;w ”相关问题
  • 第1题:

    以下程序的输出结果是()。includeint fan(int);main(){int w=5; fun(w);printf("\n");}

    以下程序的输出结果是( )。 #include <stdio.h> int fan(int); main() { int w=5; fun(w); printf("\n"); } fun(int k) { if(k>0) fun(k-1); printf("%d",k); }

    A.5 4 3 2 1

    B.0 1 2 3 4 5

    C.1 2 3 4 5

    D.5 4 3 2 1 0


    正确答案:B
    解析:本题考查函数的递归调用。fun函数共被调用6次,即fun(5)、fun(4)、fun(3)、fun(2)、fun(1)、fun(0),其中fun(5)是main函数调用的,其余是在fun函数中调用的。

  • 第2题:

    有以下程序,当输入数据为:12.5时,程序输出结果是()。 #include "stdio.h" main() { int a; scanf("%d",&a); printf("a=%dn",a); }


    -125=-5*5*5

  • 第3题:

    以下程序执行时如果输入Language Programming,则程序输出结果是? #include <stdio.h> main() { char str[30]; scanf("%s",str); printf("%sn",str); }


    str=Language Programming

  • 第4题:

    下列程序运行时输入1234567,则输出结果是______。includemain(){ int a=1,b;scanf("

    下列程序运行时输入1234567<CR>,则输出结果是______。

    include<stdio.h>

    main()

    { int a=1,b;

    scanf("%2d%2d",&a,&b);printf("%d %d\n", a,b);

    }


    正确答案:

    本题考查的重点是scanf函数的调用。scanf(“格式化字符串>”,地址表>),格式化字符串后可以加上场宽,本题中两个变量的场宽都为2,所以输入1234567CR>后,变量a的值为12。变址b的值为34,从而输出为12 34。

  • 第5题:

    【单选题】若程序执行时的输入数据是2473<回车>,则下述程序的输出结果是______。 #include <stdio.h> void main() { int cs; while((cs=getchar())!='n') {switch(cs-'2') { case 0: case 1: putchar(cs+4); case2: putchar(cs+4); break; case 3: putchar(cs+3); default:putchar(cs+2); } } }

    A.668977

    B.668966

    C.6677877

    D.6688766


    7k