网站失败后怎么重新建设,中信建设有限责任公司获奖,百度给做网站吗,创意网店名1.正确定义符号常量PI的宏定义为
A.define PI 3.14 B.define PI 3.14: C。#define PI 3.14 D #define PI 3.14#xff1b; 2。关于字符数组的描述中错误的是() A.字符数组可以存放字符串 B.字符数组中的字符串可以整体输入和输出 C。可以在赋值语句中通过运算符“”对…1.正确定义符号常量PI的宏定义为
A.define PI 3.14 B.define PI 3.14: C。#define PI 3.14 D #define PI 3.14 2。关于字符数组的描述中错误的是() A.字符数组可以存放字符串 B.字符数组中的字符串可以整体输入和输出 C。可以在赋值语句中通过运算符“”对字符数组整体赋值
D。不可以用关 系运算符对字符数组中的字符 进行比较 3.若要求从键盘读入含有空格字符的字符串应使用函数(
A. getcB. gets( C. getchar( D. scanf 4..若有表达式(w) ? (-x):(y)则其中GW等价的表达式是 A.w1 B.w0 C.w!1 b.w!0 5.程序的输出结果是
#includestdio.h #includestring.h main( { char *plabc,*p2ABC,str[50] xyz;
strcpy(str2,strcat(pl,p2)); printf(%sn,str); A. xyzabcABC B. zabcABC C。xyabcABC
D. yzabcABC 补充: strnepy(str1,str2,2)作用是将str2中最前面2个字符复制到str1中str1中原有的最前面的2个字符
答案CCBDC
1.要有#不能有
5.stractplp2为”abcABC“str2此时指向”z“即从”z“处将”abcABC“复制进去 6.有以下程序程序运行后的输出结果是 Qian , f ,95,92
# include stdio . h
# include string . h typedef struct
{char name [9];char sex ;float score [2]
}STU
void f(STU_a)
{STU_b{ Zhao , m ,85.0,90.0);
int i; strcpy (a.name,b.name);a . sex b . sex ;for ( i 0; i 2; i )a . score [i ] b . score [ i ];printf (% s ,% c ,%2.Of,%2.0f\ r , a . name , a . sex , a . score [0], a . score [1]);
}void main()
{sTU_c{Qian,f,95.0,92.0};f ( c );printf (% s ,% c ,%2.0f,%2.0f\ n , c . name , c . sex , c . score [0], c . score [1]);
分析1.值传递。 2.%m。n输出数据的占m列其中有n位小数所以是95不是95.0 7以下程序统计从终端输入的字符中大写字母的个数。 num [0中统计字母 A 的个数 num [1中统计字母 B 的个数其它依次类推。用号结束输入。请填空。 # include stdio . h
# include ctype . h main ()
{int num [26]{0}i;char c ;while ((__________)!#)if ( isupper ( c ))num [ c - A ]_____________;for ( i 0; i 26; i )Printf (% c :% d n , i A , num [ i ]);
} 原型 extern int isupper ( int c ); 头文件 ctype . h 功能判断字符 c 是否为大写英文字母
说明当参数 c 为大写英文字母 A - Z 时回非零值否则返回零。 附加说明此为宏定义非真正函数。
定义函数 int islower ( int c ) 函数说明:检查参数 c 是否为小写英文字
答案1.cgetchar() 2.1 8.函数 func 功能将一个整数 k 插入到长度为 n 的有序序列 x 中。
# include stdio . h void func ( int * x , int n , int k )
{int * p ;for (_________; p x ; p --)
{ if (* p k )
*( p 1)* p ;else
break ;
}
_____________;
}void main ()
{int a [10]{22,33,44,55.66,70,77,88,99};int c , i ;scanf (% d , c );
___________________for ( i 0; i 10; i )printf (%3d, a [ i ]);
}该算法是从数组的最后一个元素开始比较如果比该数大就往后移如果比该数小结束循环然后将该数插入
答案1.pxn-2; 2.*(p1)k; 3.fun(a,10,c);