网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

while(fabs(t)<1e-5)if(!(s/10))break;循环结束的条件是().

  • A、t>=1e-5∣∣t<=-1e-5∣∣s>-10&&s<10
  • B、fabs(t)<1e-5&&!s/10
  • C、fabs(t)<1e-5
  • D、s/10==0

参考答案

更多 “while(fabs(t)1e-5)if(!(s/10))break;循环结束的条件是().A、t=1e-5∣∣t=-1e-5∣∣s-10s10B、fabs(t)<1e-5!s/10C、fabs(t)<1e-5D、s/10==0” 相关考题
考题 38) 有以下程序:#include stdio.hvoid fun(char *t,char *s){ while(*t!=0) t++;while((*t++=*s++)!=0);}main(){ char ss[10]= " acc " ,aa[10]= " bbxxyy " ;fun(ss,aa);printf( " %s,%s\n " ,ss,aa);}程序运行结果是A)accxyy,bbxxyyB)acc, bbxxyyC)accxxyy,bbxxyyD) accbbxxyy,bbxxyy

考题 以下与库函数strcmp(char *s, chat *t)的功能相等的程序段是()。 A.strcmp1(char *s, chat *t){ for ( ;*s++==*t++ ;)if (*s=='\0') return 0return (*s-*t)}B.strcmp2(char *s, char *t){ for( ;*s++==*t++ ;)if (!*s) return0return (*s-*t)C.strcmp3(char *s, char *t){ for ( ;*t==*s ;){ if (!*t) return 0t++s++}return (*s-*t)}D.strcmp4(char *s, char *t){ for( ;*s==*t;s++,t++)if (!*s) return 0return (*t-*s)}

考题 函数my_cmp()的功能是比较字符串s和t的大小,当s等于t时返回0,否则返回s和t的第一个不同字符的ASCII码差值,即s t时返回正值,当s t时返回负值。请填空。my_cmp(char *s, char *t){while (*s == *t){if (*s == ′\0′)return 0;++s; ++t;} return 【18】 ;}

考题 下列给定程序中函数fun()的功能是:从低位开始取出长整型变量s中偶数位上的数,依次构成一个新数放在t中。例如,当s中的数为7654321时,t中的数为642。请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include<stdio.h>include <conio.h>/*************found**************/void fun(long s,long t){ long s1=10;s/=10;*t=s%10;/*************found**************/while(s<0){ s=s/100;*t=s%10*s1+*t;s1=s1*10;}}main(){ long s, t;clrscr();printf("\nPlease enter s: "); scanf("%ld",s);fun(s,t);printf("The result is: %ld\n ",t);}

考题 有以下程序includevoidfun(char*t,char*s){while(*t!=0)t++;while((*t++=*s++)!=0);}m 有以下程序 #include <stdio.h> voidfun(char*t,char*s) {while(*t!=0) t++; while((*t++=*s++)!=0); } main() {char ss[10]="acc",aa[10]="bbxxyy"; fun(ss,aa); printf("%s,%s\n",ss,aa); } 程序的运行结果是A.accxyy,bbxxyyB.acc,bbxxyyC.accxxyy,bbxxyyD.accbbxxyy,bbxxyy

考题 给定程序MODl1.C中函数fun的功能是:从低位开始取出长整型变量s中奇数位上的数,依次构成一个新数放在t中。高位仍在高位,低位仍在低位。例如:当s中的数为2736598时,t中的数为:2358。include<conio.h>include<stdio.h>/************found************/void fun(long s,long t){ long s1=10;*t=S%10;while(s>0){ s=s/l00;*t=S%10*s1+*t;/************found************/s1=s1*100;}}main(){longs,t;clrscr();printf ("\nPlease enter s:”);scanf("%ld",s);fun(s,t);printf("The result is:%1d\n",t);}

考题 有以下程序#include stdio.hvoid fun(char *t,char *s){ while(*t!=0) t++;while((*t++=*s++)!=0);}main(){ char ss[10]="acc",aa[10]="bbxxyy";fun(ss,aa); printf("%s,%s\n",ss,aa);}程序的运行结果是A.accxyy,bbxxyyB.acc,bbxxyyC.accxxyy,bbxxyyD.accbbxxyy,bbxxyy

考题 以下函数的功能对应于 int fun(char *s,char *t) { while (*s) s++; } return(*s-*t); } A.strlen(s)+strlen(t)B.strcmp(s,t)C.strcpy(s,t)D.strcat(s,t)

考题 下列给定程序中函数fun()的功能是:将长整型数中每一位上为偶数的数依次逆向取出,构成一个新数放在t中。高位在低位,低位在高位。例如当s中的数为25846513时,t中的数为6482。 请改正函数fun()中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include <stdio.h>include <conio.h>void fun(long S,long *t){int d;long sl=l,i=1;*t=0;while(s/i>0)i=i*10;i=i/10;while(s>0){d=s/i/*************found*************/if(d%2!=0){/*************found*************/t=d*sl+t;sl*=l0;}S=S%i;i=i/10;}}main(){long S,t;clrscr();printf("\nPlease enter S:");scanf("%ld",s);fun(S,t);printf("The result is:%ld\n",t);}

考题 有以下程序:#includestdio.hvoid fun(char*t,char*s){ while(*t!=O)t++;while((*t++=*s++)!=0);}main{ char ss[10]=acc,aa[10]=bbxxyy;fun(ss,aa);printf(%S,%s,ss,aa);}程序运行结果是( )。A.accxyy,bbxxyyB.ace,bbxxyyC.accxxyy,bbxxyyD.accbbxxyy,bbxxyy

考题 以下程序的功能是:从低位开始取出长整型变量s中奇数位上的数,依次构成一个新数放在t中。高位仍在高位,低位仍在低位。请填空。 include<stdio.h> main() {long s,t,s1=10; pfintf("\n.Please enter s:"); scanf("%1d",s); t=s%10; while(s>0) {s=s/100; t=( ); s1=s1*10; } printf("The result is:%1d\n",t); }

考题 有以下程序 include void fun(char *t, char *s) { whil 有以下程序 #include <stdio.h> void fun(char *t, char *s) { while(*t!=0) t++; while( (*t++ = *s++ )!=0 ); main() { char ss[10]="acc",aa[10]="bbxxyy"; fun(ss, aa); printff"%s,%s\n", ss,aa); 程序的运行结果是A.accxyy, bbxxyyB.acc, bbxxyyC.accxxyy, bbxxyyD.accbbxxyy, bbxxyy

考题 有如下程序: include using namespace std; template T total(T * data) 有如下程序:include<iostream>using namespace std;template<typename T>T total(T * data) {T s=0;While(* data)s+ = *data + +;return s;}int main(){int x[]:{2,4,6,8, 10, 12, 14, 16, 18};cout<<total(x);

考题 函数mycmp(char *s,char *t)的功能是比较字符串s和t的大小,当s等于t时返回0,当st时返回正值,当st时返回负值,请填空。mycmp( char *s,char *t){ while (*s==*t) { if (*s==’\0’)return 0; ++s;++t; } return();}

考题 以下不能将S所指字符串正确复制到t所指存储空间的是( )。A.while(*t=*s){t++;s++;)B.for(i=0;t[i]=s[i];i++);C.do{*t++=*s++;)while(*s);D.for(i=0,j=o;t[i++]=s[j++];);

考题 以下不能将s所指字符串正确复制到t所指存储空间的是( )。A.do{*t++=*8++;}while(*s);B.for(i=0;t[i]=s[i];i++);C.while(*t=*s){t++;s++;}D.for(i=0,j=0;t[i++]=s[j++];);

考题 在执行以下程序时,为了使输出结果为t=4,给a和b输入的值应该满足的条件是_______。 main() { int s,t,a,b; scanf("%d%d",a,B) ; s=1;t=1; if(a>0)s=s+1; if(a>B) t=s+t; else if(a==B) t=5; else t=2*s; printf("t=%d\n",t); }A.a>bB.a<b<0C.0<a<bD.0>a>b

考题 以下不能将s所指字符串正确复制到t所指存储空间的是( )。A.while(*t=*s){t++;s++;}B.for(i=0;t[i]=s[i];i++);C.do{*t++:*s++;}while(*s);D.for(i=0,j=0;t[i++]=s[j++];);

考题 有以下程序: #includestdio.h void fun(char*t,char*s) { while(*t!=O)t++; while((*t++=*s++)!=0); } main { char ss[10]="acc",aa[10]="bbxxyy"; fun(ss,aa);printf("%S,%s",ss,aa); } 程序运行结果是( )。A.accxyy,bbxxyyB.ace,bbxxyyC.accxxyy,bbxxyyD.accbbxxyy,bbxxyy

考题 有以下程序 include void fun(char *t,char *s) { while(*t!=0) t++; while((*t++=*s 有以下程序#include <stdio.h>void fun(char *t,char *s){ while(*t!=0) t++;while((*t++=*s++)!=0);}main( ){ char ss[10]="acc",aa[10]="bbxxyy";fun(ss,aa); printf("%s,%s\n",ss,aa);}程序的运行结果是A.accxyy,bbxxyyB.acc,bbxxyyC.accxxyy,bbxxyyD.accbbxxyy,bbxxyy

考题 有以下程序#include stdio.hvoid fun(char *t,char *s){while(*t!=0) t++;while(*t++=*s++)!=0);}main(){char ss[10]=”acc”,aa[10]=”bbxxyy”;fun(ss,aA.; printf(“%s,%s\n”,ss,aA.;}程序的运行结果是( )。A.accxyy,bbxxyyB.acc,bbxxyyC.accxxyy,bbxxyyD.accbbxxyy,bbxxyy

考题 函数AAA(s,t) char*s,*t; {while(*t++); t--; while(*t++=*s++); } 的功能是:()。A、求串的长度B、比较两个串的大小C、将串s复制到串t中D、将串s连接到串t中

考题 若f(t)-----F(s),Re[s]s0,且有实常数t00,则()A、f(t-t0)e(t-t0)-----e-st0F(s)B、f(t-t0)e(t-t0)-----e-st0F(s),Re[s]s0C、f(t-t0)e(t-t0)-----est0F(s),Re[s]s0D、f(t-t0)e(t-t0)-----e-st0F(s),Re[s]0

考题 物体运动方程s=5t2当△t趋近于0但不等于0时,∣△s/△t-10t∣可以任意小。

考题 单选题以下不能将s所指字符串正确复制到t所指存储空间的是(  )。A while(*t=*s){t++;s++;}B for(i=0;t[j]=s[i];i++);C do{*t++=*s++;}while(*s);D for(i=0,j=0;t[i++]=s[j++];);

考题 单选题有以下程序#include void fun(char *t,char *s){ while(*t!=0)t++; while((*t++=*s++)!=0);}main(){ char ss[10]="acc",aa[10]="bbxxyy"; fun(ss,aa); printf("%s,%s",ss,aa);}程序的运行结果是(  )。A accbbxxyy,bbxxyyB acc,bbxxyyC accxxyy,bbxxyyD accxyy,bbxxyy

考题 单选题函数AAA(s,t) char*s,*t; {while(*t++); t--; while(*t++=*s++); } 的功能是:()。A 求串的长度B 比较两个串的大小C 将串s复制到串t中D 将串s连接到串t中