单项选择题

下列选项中不会引起二义性的宏定义是( )。

A) #define S(x)x*x
B) #define S(x)(x)*(x)
C) #define S(x)(x*x)
D) #define S(x)((x)*(x))
<上一题 目录 下一题>
热门 试题

单项选择题
若已包括头文件<stdio.h>和<string.h>,运行下列程序段时输出结果是( )。 int i=0; char s1[10]= ABCD ,s2[10]= EFG ; strcat(s1,s2); while(s2[i++]!=' 0') s2[i]=s1[i]; puts(s2);
A) ABC
B) ABCDEF
C) EBCDEFG
D) CBD
单项选择题
阅读下列程序,当运行函数时,输入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'; main() char str[81]; int n; 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
相关试题
  • 下列程序的功能是将字符串s中所有的字符C删...
  • 以下程序运行后的输出结果是______。...
  • 以下程序中函数fun的功能是:构成一个如图...
  • 下面程序的功能是输出数组s中最大元素的下...
  • 以下程序运行后输入:3,abcde<回车>,...