[单选题]

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

#include

#include

#include

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;

clrscr();

printf("Input a string : ");

gets(str);

puts(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'; }

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

    [单选题]阅读下列程序,当运行程序时,输入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[

  • 查看答案
  • 阅读下列程序段,则程序的输出结果为 #include "stdio.h" #de

    [单选题]阅读下列程序段,则程序的输出结果为#include "stdio.h"#define M(X,Y)(X)*(Y)#define N(X,Y)(X)/(Y)main(){ int a=5,b=6,c=8,k;k=N(M(a,b),c);printf("%d/n",k);A.3B.5C.6D.8

  • 查看答案
  • 阅读下列程序,则运行结果为 #include "stdio.h" fun() {

    [单选题]阅读下列程序,则运行结果为#include "stdio.h"fun(){ static int x=5;x++;return x;}main(){ int i,x;for(i=0;i<3;i++)x=fun();printf("%d/n",x);}A.5B.6C.7D.8

  • 查看答案
  • 阅读下列程序段,则程序的输出结果为#include"stdio.h"#defin

    [单选题]阅读下列程序段,则程序的输出结果为 #include"stdio.h" #defineM(X,Y)(X)*(Y) #defineN(X,Y)(X)/(Y) main() {f int a=5,b=6,c=8,k; k=N(M(a,b),c); printf("%d/n",k);}A.3B.5C.6D.8

  • 查看答案
  • 阅读下列程序段,则程序的输出结果为#include"stdio.h"#defin

    [单选题]阅读下列程序段,则程序的输出结果为 #include"stdio.h" #define M(X,Y)(X)*(Y) #define N(X,Y)(X)/(Y) main() { int a=5,b=6,c=8,k; k=N(M(a,b),c); printf("%d/n",k);}A.3B.5C.6D.8

  • 查看答案
  • 当执行下面的程序时,如果输入ABC,则输出结果是 ( ) # include #

    [单选题]当执行下面的程序时,如果输入ABC,则输出结果是 ( ) include include当执行下面的程序时,如果输入ABC,则输出结果是 ( ) # include<stdio.h> # include<string.h> main( ) { char ss [10] ="12345"; gets(ss);strcat(ss"6789");printf("%s/n",ss); }A.ABC6789B.ABC67C.12345ABC6D.ABC456789

  • 查看答案