[试题]

以下程序的输出结果是( 14 )

#include <stdio.h>

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

main( )

{ char *p,*q,*r,

p=q=r=(char*)malioc( sizeof(char)*20);

strcpy(p,"attaboy,welcome!");

printf(”%c%c%c/n”,p[ 11 ], q[ 3 ],r[ 4 ]);

free(p);

}

参考答案与解析:

相关试题

以下程序的输出结果是_[13]_______ #include<stdio.h>

[主观题]以下程序的输出结果是_[13]_______#include <stdio.h>#include <string.h>char *fun(char *t){ char *p=t;return(p+strlen(t)/2);}main(){ char *str="abcdefgh";str=fun(str);puts(str);}

  • 查看答案
  • 以下程序的输出结果是_[19]_______ #include<stdio.h>

    [试题]以下程序的输出结果是_[19]_______#include <stdio.h>#define M 5#define N M+Mmain(){ int k;k=N*N*5; printf("%d/n",k);}

  • 查看答案
  • 以下程序的输出结果是 ( 11 ) 。#include <stdio.h>voi

    [试题]以下程序的输出结果是 ( 11 ) 。#include <stdio.h>void swap(int *a,int *b){ int *t;t=a; a=b; b=t;}main(){ int i=3,j=5,*p=&i,*q=&j;swap(p,q); printf("%d %d/n",*p,*q);}

  • 查看答案
  • 以下程序的输出结果是 ( 12 ) 。#include <stdio.h>mai

    [试题]以下程序的输出结果是 ( 12 ) 。#include <stdio.h>main(){ int a[5]={2,4,6,8,10}, *p;p=a; p++;printf("%d",*p);}

  • 查看答案
  • 以下程序的输出结果是 ( 13 ) 。#include <stdio.h>voi

    [试题]以下程序的输出结果是 ( 13 ) 。#include <stdio.h>void fun(int x){ if(x/2>0) fun(x/2);printf("%d",x);}main(){ fun(3); printf("/n");}

  • 查看答案
  • 以下程序的输出结果是 ( 11 ) 。#include <stdio.h>int

    [试题]以下程序的输出结果是 ( 11 ) 。#include <stdio.h>int fun(int x){ static int t=0;return(t+=x);}main(){ int s,i;for(i=1;i<=5;i++) s=fun(i);printf("%d/n",s);}

  • 查看答案
  • 以下程序的输出结果是 #include <stdio.h> void prt (

    [单选题]以下程序的输出结果是#include <stdio.h>void prt (int *x, int*y, int*z){printf("%d,%d,%d/n",++*x,++*y,*(z++));}main(){int a=10,b=40,c=20;prt (&a,&b,&c);prt (&a,&b,&c);}A.11,42, 31 12,22,41B.11,41,20 12,42,20C.11,21,40 11,21,21D.11

  • 查看答案
  • 以下程序的输出结果是( 10 )。#include .<stdio.h>Main

    [试题]以下程序的输出结果是( 10 )。#include .<stdio.h>Main( ){ char a,b;for( a=0; a<20; a+=7) { b=a% 10; putchar(b+'0'); }}

  • 查看答案
  • 以下程序的输出结果是( 7 )。#include <stdio.h>main(

    [试题]以下程序的输出结果是( 7 )。#include <stdio.h>main( ){ int a=37;a+=a%=9; printf(”%d/n”, a),}

  • 查看答案
  • 以下程序的输出结果是 ( 11 )。#include <stdio.h>main

    [试题]以下程序的输出结果是 ( 11 )。#include <stdio.h>main( ){ char *ch[4]={"red',"green","blue"};int i=0;while( ch[i] ){ putchar( ch[i][0]); i++;)}

  • 查看答案
  • 以下程序的输出结果是( 14 )#include <stdio.h> #incl