下列程序的输出结果是( ) int main(void) { FILE *fp; int i,k,n; fp=fopen("data.dat","w+"); for(i=1;i<6;i++) { fprintf(fp,"%d",i); if(i%3==0) fprintf(fp,"\n"); } rewind(fp); fscanf(fp,"%d%d",&k,&n); printf("%d%d\n",k,n); fclose(fp); return 0;}
下列程序的输出结果是( ) int main(void) { FILE *fp; int i,k,n; fp=fopen("data.dat","w+"); for(i=1;i<6;i++) { fprintf(fp,"%d",i); if(i%3==0) fprintf(fp,"\n"); } rewind(fp); fscanf(fp,"%d%d",&k,&n); printf("%d%d\n",k,n); fclose(fp); return 0;}
【单选题】下面程序段的输出结果是 () 。 int k,a[3][3]={1,2,3,4,5,6,7,8,9}; for (k=0;k<3;k++) printf(“%d”,a[k][2-k]); ( A ) 3 5 7 ( B ) 3 6 9 ( C ) 1 5 9 ( D ) 1 4 7 A. 3 5 7 B. 3 6 9 C. 1 5 9 D. ( A ) 1 4 7
【单选题】下面程序段的输出结果是 () 。 int k,a[3][3]={1,2,3,4,5,6,7,8,9}; for (k=0;k<3;k++) printf(“%d”,a[k][2-k]); ( A ) 3 5 7 ( B ) 3 6 9 ( C ) 1 5 9 ( D ) 1 4 7 A. 3 5 7 B. 3 6 9 C. 1 5 9 D. ( A ) 1 4 7
有以下函数:voidf(){FILE*fp;inti,n=0,k=0;fp=fopen(“source.txt”,”w”);for(i=0;i<5;i++)fprintf(fp,”%d”,i);fclose(fp);fp=fopen(“source.txt”,”r”);fscanf(fp,”%d%d”,&n,&k);printf(“%d,%d”,n,k);fclose(fp);}输出结果为()
有以下函数:voidf(){FILE*fp;inti,n=0,k=0;fp=fopen(“source.txt”,”w”);for(i=0;i<5;i++)fprintf(fp,”%d”,i);fclose(fp);fp=fopen(“source.txt”,”r”);fscanf(fp,”%d%d”,&n,&k);printf(“%d,%d”,n,k);fclose(fp);}输出结果为()
下面程序的执行结果是 ______。 int k; for (k=10 ; k<3 ; k--) { if (k%3) k--; -k; k; cout<<k<< ", "; } A: 6, 3 B: 7, 4 C: 6, 2 D: 7, 4, 1
下面程序的执行结果是 ______。 int k; for (k=10 ; k<3 ; k--) { if (k%3) k--; -k; k; cout<<k<< ", "; } A: 6, 3 B: 7, 4 C: 6, 2 D: 7, 4, 1
下列程序段的运行结果是( )。Dim aa = Array(1, 3, 5, 7, 9, 11)For k = 0 To 2Print a(5 - k) - a(k);Next k A: 10 7 4 B: 10 6 2 C: 9 5 3 D: 10 6 3
下列程序段的运行结果是( )。Dim aa = Array(1, 3, 5, 7, 9, 11)For k = 0 To 2Print a(5 - k) - a(k);Next k A: 10 7 4 B: 10 6 2 C: 9 5 3 D: 10 6 3
多项式p()<br/>= x5+3x2-7x-4在MATLAB中的正确表示为?() A: [1<br/>3 -7 -4] B: [1<br/>0 3 -7 -4] C: [1<br/>3 0 -7 -4] D: [1<br/>3 -7 -4 0]
多项式p()<br/>= x5+3x2-7x-4在MATLAB中的正确表示为?() A: [1<br/>3 -7 -4] B: [1<br/>0 3 -7 -4] C: [1<br/>3 0 -7 -4] D: [1<br/>3 -7 -4 0]
图示结构中K截面的剪力为( )。 A: -FP /2 B: -FP C: 0 D: FP
图示结构中K截面的剪力为( )。 A: -FP /2 B: -FP C: 0 D: FP
下列程序输出结果是______。 k=0 while k<=3: k=k+2 print(k) A: 0 B: 2 C: 3 D: 4
下列程序输出结果是______。 k=0 while k<=3: k=k+2 print(k) A: 0 B: 2 C: 3 D: 4
有以下程序: #include <stdio.h> main() { FILE*fp; int i,a[6] = {1,2,3,4,5,6},k; fp = fopen("data.dat", "w+b"); fwrite(&a[0],sizeof(int),1,fp); for(i=1; i<6; i++) { fseek(fp, 0L, 0); fread(&k, sizeof(int), 1, fp); fseek(fp, 0L, 0); a[i] +=k; fwrite(&a[i], sizeof(int), 1, fp); } rewind(fp); fread(&k, sizeof(int), 1, fp); fclose(fp); printf("%d\n",k); } 程序的运行结果是______。[/i][/i] A: 21 B: 6 C: 123456 D: 11
有以下程序: #include <stdio.h> main() { FILE*fp; int i,a[6] = {1,2,3,4,5,6},k; fp = fopen("data.dat", "w+b"); fwrite(&a[0],sizeof(int),1,fp); for(i=1; i<6; i++) { fseek(fp, 0L, 0); fread(&k, sizeof(int), 1, fp); fseek(fp, 0L, 0); a[i] +=k; fwrite(&a[i], sizeof(int), 1, fp); } rewind(fp); fread(&k, sizeof(int), 1, fp); fclose(fp); printf("%d\n",k); } 程序的运行结果是______。[/i][/i] A: 21 B: 6 C: 123456 D: 11
【单选题】Which of the following matrices does not have the same determinant of matrix B: [1, 3, 0, 2; -2, -5, 7, 4; 3, 5, 2, 1; -1, 0, -9,-5] A. [1, 3, 0, 2; -2, -5, 7, 4; 0, 0, 0, 0; -1, 0, -9, -5] B. [1, 3, 0, 2; -2, -5, 7, 4; 1, 0, 9, 5; -1, 0, -9, -5] C. [1, 3, 0, 2; -2, -5, 7, 4; 3, 5, 2, 1; -3, -5, -2, -1] D. [1, 3, 0, 2; -2, -5, 7, 4; 0, 0, 0, 1; -1, 0, -9, -5]
【单选题】Which of the following matrices does not have the same determinant of matrix B: [1, 3, 0, 2; -2, -5, 7, 4; 3, 5, 2, 1; -1, 0, -9,-5] A. [1, 3, 0, 2; -2, -5, 7, 4; 0, 0, 0, 0; -1, 0, -9, -5] B. [1, 3, 0, 2; -2, -5, 7, 4; 1, 0, 9, 5; -1, 0, -9, -5] C. [1, 3, 0, 2; -2, -5, 7, 4; 3, 5, 2, 1; -3, -5, -2, -1] D. [1, 3, 0, 2; -2, -5, 7, 4; 0, 0, 0, 1; -1, 0, -9, -5]