填空题
下列程序中,字符串中各单词之间有一个空格,则程序的输出结果是 【8】 。
#include
main()
char strl[]="How do you do", *p1=strl;
strcpy(strl+strlen(strl)/2,"es she");
printf("%s\n",p1);
【参考答案】
How does she
热门
试题
填空题
下列程序的功能是计算机一元二次方程的根。 #include 【10】 #include <stdio.h> main ( ) float a, b, c, disc, x1, x2, realpart, imagpart; scanf( %f%f%f ,&a,&b,&c); printf( The equation ); if( 【11】 <=1e-6) printf( is not quadratic n ); else disc=b*b-4*a*c; if (fabs (disc) <=1e-6) printf( has two equal roots:%-8.4f n ,-b (2*a)); else if( 【12】 ) x1= (-b+sqrt (disc)) (2*a); x2= (-b-sqrt (disc)) (2*a); printf( has distinct real roots:%8.4f and %.4f n ,xl,x2); else realpart=-b (2*a); imagpart=sqrt (-disc) (2*a); printf( has complex roots: n ); printf ( %8.4f+%. 4fi n , realpart, imagpart); printf ( %8.4f-%. 4fi n , realpart, imagpart);