填空题

以下程序运行后的输出结果是 【16】 。
#include <stdio, h>
#include <stating, h>
void fun(char * s,int p,int k)
int i;
for(i=p;i<k-1;i++) s[i] =s[i+2];main( )
char s [] = "abedefg";
fun(s,3 ,strlen(s) ); puts(s);

【参考答案】

abcfg
<上一题 目录 下一题>
热门 试题

填空题
以下程序中函数huiwen的功能是检查一个字符串是否是回文,当字符串是回文时,函数返回字符串“yes!”,否则函数返回字符串“no!”,并在主函数中输出。所谓回文即正向与反向的拼写都一样,例如:adsda。请填空。 #include <stdio, h>#include <string, h>char * huiwen(char * str) char *p1, * p2; int i,t=0; p1 = str;p2 = 【10】 ; for(i =0;i<= strlen(str) 2;i ++ ) if( * pl ++ ! = * p2 -- ) t = 1 ;break if( 【11】 ) return( yes ! ); else return( no! );main( ) char str[50]; printf( Iaput: ); scanf( % s , str); printf( %s n , 【12】 );
填空题
已知字符’A’的ASCII代码值为65,以下程序运行时若从键盘输入:B33 <回车>,则输出结果是 【9】 。 #include <stdio.h> main( ) char a,b; a = getchar( ) ;seanf( % d ,&b); a=a-’A’ +’0’;b=b* 2; prinff( % c % c n ,a,b);
相关试题
  • 以下程序运行后的输出结果是 【17】 。...
  • 以下程序中,fun函数的功能是求3行4列二...
  • 以下程序运行后输出结果是 【18】 。#...
  • 以下程序运行后的输出结果是 【19】 。...
  • 有下面的程序:#include <stdio, h>m...