单项选择题

下列程序运行后,如果从键盘上输入ABCDE<回车>,则输出结果为______。
#include<stdio.h>
#include<string.h>
fuch (char str[] )
int num=0;
while (*(str+num)!=’\0’)num++;
return(num);
main()
char str[10],*p=str;
gets(p);printf("%d\n",fuch(p));

A.8
B.7
C.6
D.5
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序的运行结果为______。 main ( ) int a, *p; p=&a; a=100; printf( a=%d *p=%d *&a=%d &*p=%u ,a,*p,*&a,&*p); a++; printf( a++=%d ,a); (*p) ++; printf( (*p)++=%d ,*p); *p++; printf ( *p++=%d n , *p);
A.a=100 *p=100 *&a=100 &*p=65498 a++=101 (*p)++=102 *p++=-24
B.a=100 *p=100 *&a=100 &*p=65498 a++=101 (*p)++=102 *p++=-102
C.a=100 *p=100 *&a=65498 &*p=65498 a++=101 (*p)++=102 *p++=-24
D.a=100 *p=100 *&a=100 &*p=65498 a++=101 (*p)++=101 *p++=-24
单项选择题
下列程序运行后,输出结果是______。 #include <stdio. h> #include <string. h> fun (char *w ,int n) char t,*s1,*s2; s1=w; s2=w+n-1; while (s1<s2) t=*s1++; *s1=*s2--; *s2=t; main () char *p; p= 1234567 ; fun (p, strlen (p)); puts (p);
A.1234567
B.7654321
C.1711717
D.7177171
相关试题
  • 下列程序的功能是计算1~100的整数的累...
  • 下列程序的输出结果是 【8】 。 int t...
  • 输出若干学生3门课程的成绩。 #include...
  • 近年来形成了软件开发的多种模式,大致有3...
  • 下列程序的运行结果为 【5】 。 main ...