#nclude<stdio.h>
main()
{ struct node{int n;struct nodc*next;}*p;
struct node x[3]={{2,x+1},{4,x+2},{6,NULL}};
p=x:
printf("%d,",p->n);
printf("%d\n",P->next->n);
}
程序运行后的输出结果是
A.2,3
B.2,4
C.3,4
D.4,6
[单选题]有以下程序#nclude<stdio.h>#include<string.h>main(){ char a[5][10]={"china","beijing","you","tiananmen","welcome"};int i,j;char t[10];for(i=0;i<4;i++)for(j=i+1;j<5;j++)if(strcmp(a[i],a[j])>0){strcpy(t,a[i]);strcpy(a[i],a[j]);
[单选题]有以下程序#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.)Qia
[单选题](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 ) 。