• 2022-05-27 问题

    语句prinff(”%d\n”,strlen(”\t\”\、、n\"\065\08AB”));的输出结果是( )。 A: 6 B: 7 C: 8 D: 9

    语句prinff(”%d\n”,strlen(”\t\”\、、n\"\065\08AB”));的输出结果是( )。 A: 6 B: 7 C: 8 D: 9

  • 2022-05-28 问题

    设有定义:float x=123.4567;,则执行以下语句后的输出结果是【 】。prinff("%f\n",(int)(x*100+0.5)/100.0);

    设有定义:float x=123.4567;,则执行以下语句后的输出结果是【 】。prinff("%f\n",(int)(x*100+0.5)/100.0);

  • 2022-06-03 问题

    当执行以下程序时,输入1234567890,则其中while循环体将执行【 】次。#include main() {char ch; while((ch=getchar())=′0′)prinff("#"); }

    当执行以下程序时,输入1234567890,则其中while循环体将执行【 】次。#include main() {char ch; while((ch=getchar())=′0′)prinff("#"); }

  • 2021-04-14 问题

    读下列程序: #include void main() { float a,b,t; scanf(”%f,%f”,&a,&b); if(a>b) { t=a; a=b; b=t; } prinff(”%5.2f,%5.2f'’,a,b); } 运行时从键盘输入3.8和-3.4,则正确的输出结果是( )。

    读下列程序: #include void main() { float a,b,t; scanf(”%f,%f”,&a,&b); if(a>b) { t=a; a=b; b=t; } prinff(”%5.2f,%5.2f'’,a,b); } 运行时从键盘输入3.8和-3.4,则正确的输出结果是( )。

  • 2022-06-08 问题

    以下程序运行后的输出结果是 。 #include <stdio.h> int f( iht a[] ,int n) if(n>=1) returnf(a,n-1) +a[n-1]; else return 0; main( ) int aa[5] = 1,2,3,4,5 ,s; s = f(aa,5); prinff(" % d \\n" ,s);

    以下程序运行后的输出结果是 。 #include <stdio.h> int f( iht a[] ,int n) if(n>=1) returnf(a,n-1) +a[n-1]; else return 0; main( ) int aa[5] = 1,2,3,4,5 ,s; s = f(aa,5); prinff(" % d \\n" ,s);

  • 2022-06-05 问题

    执行以下程序后,test.txt文件的内容是(若文件能正常打开) ( )。#include <stdio.h>#include <stdlib.h>main( ) FILE * fp; char * s1 = "Fortran" , * s2 = "Basic"; if((fp = fopen( "test. txt" ," wb" )) = = NULL) prinff( "Can’t open test. txt file \n"); exit(1); fwrite( s1 ,7,1 ,fp); /* 把从地址s1开始到7个字符写到fp所指文件中*/ fseek(fp,OL,SEEK_SET); /*文件位置指针移到文件开头*/ fwrite (s2,5,1,fp); felose (fp); A: Basiean B: BasieFortran C: Basic D: FortranBasie

    执行以下程序后,test.txt文件的内容是(若文件能正常打开) ( )。#include <stdio.h>#include <stdlib.h>main( ) FILE * fp; char * s1 = "Fortran" , * s2 = "Basic"; if((fp = fopen( "test. txt" ," wb" )) = = NULL) prinff( "Can’t open test. txt file \n"); exit(1); fwrite( s1 ,7,1 ,fp); /* 把从地址s1开始到7个字符写到fp所指文件中*/ fseek(fp,OL,SEEK_SET); /*文件位置指针移到文件开头*/ fwrite (s2,5,1,fp); felose (fp); A: Basiean B: BasieFortran C: Basic D: FortranBasie

  • 1