[单选题]

阅读下列程序,当运行程序时,输入asd af aa z67,则输出为()。includeint fun (char *str

阅读下列程序,当运行程序时,输入asd af aa z67,则输出为( )。 #include <sldio.h> int fun (char *str) { int i,j=0; for(i=0;str[i]! ='/0';i++) if(str[i]! =") str[j++]=str[i]; str[j]='/0'; } main() { char str[81]; int n; printf("Input a string:"); gets(str); fun(str); printf("%s/n",str); }

A.asdafaaz67

B.asd af aa z67

C.asd

D.z67

参考答案与解析:

相关试题

阅读下列程序,当运行函数时,输入asd af aa z67,则输出为#inclu

[单选题]阅读下列程序,当运行函数时,输入asd af aa z67,则输出为include include i阅读下列程序,当运行函数时,输入asd af aa z67,则输出为 #include <stdio.h> #include <ctype.h> #include <string.h> int fun(char*str) { int i,j=0; for(i=0;str[i]!='/0';i++) if(str[i]!='')str[j++]=str[i]; str[j]='/0';

  • 查看答案
  • 阅读下列程序,当运行函数时,输入asd af aa z67,则输出为 #incl

    [单选题]阅读下列程序,当运行函数时,输入asd af aa z67,则输出为#include <stdio.h>#include <ctype.h>#include <string.h>int fun (char *str){ int i,j=0;for(i=0;str[i]!=′ /0′;i++)if(str[i]!=′ ′)str[j++]=str[i];str[j]= ′/0′;}main(){char str[81];int n;printf("Input

  • 查看答案
  • 阅读下列程序,当运行函数时,输入asd af aa z67,则输出为#inclu

    [单选题]阅读下列程序,当运行函数时,输入asd af aa z67,则输出为includeincludeine阅读下列程序,当运行函数时,输入asd af aa z67,则输出为 #include <stdio.h> #include <ctype.h> #inelude <string.h> int fun(char *str) { int i,j=0; for(i=0;str[i]!='/0';i++) if(str[i]!='')str[j++]=str[i]; str[j]='/0'

  • 查看答案
  • 阅读下列程序,当运行函数时,输入asd af aa z67,则输出为#inclu

    [单选题]阅读下列程序,当运行函数时,输入asd af aa z67,则输出为includeincludeinc阅读下列程序,当运行函数时,输入asd af aa z67,则输出为 #include<stdio.h> #include<ctype.h> #include<string.h> int fun(char*str) { int i,j=0; for(i=0;str[i]!='/0';i++) if(str[i]!='')str[j++]=str[i]; str[j]='/0'; }

  • 查看答案
  • 阅读下列程序,当运行函数时,输入asdafaaz67,则输出为 #include

    [单选题]阅读下列程序,当运行函数时,输入asd af aa z67,则输出为#include#include#includeint fun (char *str){ int i,j=0;for(i=0;str[i]!=′\0′;i++)if(str[i]!=′ ′)str[j++]=str[i];str[j]= ′\0′;}main(){char str[81];int n;clrscr();printf("Input a string : ");gets(str);puts(str);fun(st

  • 查看答案
  • 执行程序时的输入为123456789,则程序的运行结果为(7)。 #includ

    [主观题]执行程序时的输入为123456789,则程序的运行结果为 (7) 。#include "stdio.h"main(){ int a,b;scanf( "%2d%*2d%1d",&a,&b);printf( "%d\n",a-b);}

  • 查看答案
  • 运行下列程序时,若输入数据为“321”,则输出结果是()。main(){int

    [单选题]运行下列程序时,若输入数据为“321”,则输出结果是( )。 main() {int num,i,j,k,s; scanf("%d",&num); if(num>99) s=3; else if(num>9) s=2; else s=1; i=num/100; j=(num-i*100)/10; k=(num-i*100-j*10); switch(s) {case 3:printf("%d%d%d/n",k,j,i); break; case 2:printf("%d%d/n

  • 查看答案
  • 当运行以下程序时,输入 abcd ,程序的输出结果是 : ( 9 ) 。inse

    [试题]当运行以下程序时,输入 abcd ,程序的输出结果是 : ( 9 ) 。insert(char str[]){ int i;i=strlen(str);while(i>0){ str[2*i]=str[i];str[2*i-1]='*'; i--;}printf(" % s/n",str);}main(){ char str[40];scanf(" % s",str);insert(str);}

  • 查看答案
  • 有以下程序: 执行程序时,给变量x输入l0,程序运行后的输出结果是( )。

    [单选题]有以下程序:执行程序时,给变量x输入l0,程序运行后的输出结果是( )。A.55B.54C.65D.45

  • 查看答案
  • 有以下程序: 当执行程序时从键盘上输入Hello Beijing<回车>,则程序

    [单选题]有以下程序:当执行程序时从键盘上输入Hello Beijing<;回车>;,则程序运行后的输出结果是( )。A.hello bajiIlgB.Hello BeijingC.HELLO BEIJINGD.hELLO Beijing

  • 查看答案
  • 阅读下列程序,当运行程序时,输入asd af aa z67,则输出为()。#in