#include <stdio.h>
main()
{
struct STU { char name[9]; char sex; double score[2];};
struct STU a={"Zhao",'m',85.0,90.0},b={"Qian",'f',95.0,92.0};
b=a;
printf("%s,%c,%2.0f,%2.0f/n", b.name, b.sex, b.score[0], b.score[1]);
}
程序的运行结果是
A.)Qian,f,95,92
B.)Qian,m,85,90
C.) Zhao,f,95,92
D.)Zhao,m,85,90
[单选题]有以下程序#include <stdio.h>struct stu{ int num; char name [10];int age;};Void fun(struct stu *p){ printf("%s\n,p->name);}main( ){ struct stu x[3]={ {01,”Zhang”,20},{02, ” Wang”,19},{03, ”zhao”,18} };fun(x+2);}程序运行后的输出结果是A.)ZhangB.)ZhaoC.)WangD.
[单选题](37)有以下程序#include <stdio.h>struct ord{ int x,y;} dt[2]={1,2,3,4};main(){ struct ord *p=dt;printf (“%d,”,++p->x); printf(“%d/n”,++p->y);}程序的运行结果是A.)1,2 B)2,3 C)3,4 D)4,1
[试题]有以下程序#include <stdio.h>typedef struct{ int num;double s ; }REC;void fun1( REC x ){x.num=23; x.s=88.5;}main(){ REC a={16,90.0 };fun1(a);printf("%d/n",a.num);}程序运行后的输出结果是 ( 1 4 ) 。
[单选题]( 39 )有以下程序include <stdio.h>main (){ int a=2,b=2,c=2;printf ( " %d/n " ,a£¯b&am( 39 )有以下程序#include <stdio.h>main (){ int a=2,b=2,c=2;printf ( " %d/n " ,a/b&c ) ;}程序运行后的输出结果是A. ) OB. ) 1C. ) 2D. ) 3
[试题]( 11 )有以下程序#include <stdio.h>main (){ int a[3][3]={{1,2,3},{4,5,6},{7,8,9}};int b[3]={0},i;for ( i=0;i<3;i++ ) b[i]=a[i][2]+a[2][i];for ( i=0;i<3;i++ ) printf ( " %d " ,b[i] ) ;printf ( " /n " ) ;}程序运行后的输出结果是 ( 11 ) 。
[试题]( 10 )有以下程序#include <stdio.h>main (){ int a[]={1,2,3,4,5,6},*k[3],i=0;while ( i<3 ){ k[i]=&a[2*i];printf ( " %d " ,*k[i] ) ;i++;}}程序运行后的输出结果是 ( 10 ) 。
[试题]( 11 )有以下程序#include <stdio.h>main (){ int a[3][3]={{1,2,3},{4,5,6},{7,8,9}};int b[3]={0},i;for ( i=0;i<3;i++ ) b[i]=a[i][2]+a[2][i];for ( i=0;i<3;i++ ) printf ( " %d " ,b[i] ) ;printf ( " /n " ) ;}程序运行后的输出结果是 ( 11 ) 。
[试题]( 10 )有以下程序#include <stdio.h>main (){ int a[]={1,2,3,4,5,6},*k[3],i=0;while ( i<3 ){ k[i]=&a[2*i];printf ( " %d " ,*k[i] ) ;i++;}}程序运行后的输出结果是 ( 10 ) 。
[主观题]( 10 )有以下程序#include <stdio.h>main (){ int a[]={1,2,3,4,5,6},*k[3],i=0;while ( i<3 ){ k[i]=&a[2*i];printf ( " %d " ,*k[i] ) ;i++;}}程序运行后的输出结果是 ( 10 ) 。
[主观题]( 11 )有以下程序#include <stdio.h>main (){ int a[3][3]={{1,2,3},{4,5,6},{7,8,9}};int b[3]={0},i;for ( i=0;i<3;i++ ) b[i]=a[i][2]+a[2][i];for ( i=0;i<3;i++ ) printf ( " %d " ,b[i] ) ;printf ( " /n " ) ;}程序运行后的输出结果是 ( 11 ) 。