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

题目内容 (请给出正确答案)
有以下程序:include struet STU{charname[10]; int num; float TotalSeore; };void f(

有以下程序:#include <stdio.h>struet STU{ charname[10]; int num; float TotalSeore; };void f(struet STU * p){ struet STU s [2] = { { "SunDan" ,20044,550 } , { "Penghua" ,20045,537 } } , * q = s; ++p; ++q; *p= *q;}main( ){ struct STU s[3] = { { "YangSan" ,20041,703 }, { "LiSiGuo" ,20042,580} }; f(s) ;printf("% s % d % 3.Of\n" ,s [1]. name, s [1]. num ,s [1]. TotalScore);}程序运行后的输出结果是( )。

A.SunDan 20044 550

B.Penghua 20045 537

C.LiSiGuo 20042 580

D.SunDan 20041 703


参考答案

更多 “ 有以下程序:include struet STU{charname[10]; int num; float TotalSeore; };void f( 有以下程序:#include <stdio.h>struet STU{ charname[10]; int num; float TotalSeore; };void f(struet STU * p){ struet STU s [2] = { { "SunDan" ,20044,550 } , { "Penghua" ,20045,537 } } , * q = s; ++p; ++q; *p= *q;}main( ){ struct STU s[3] = { { "YangSan" ,20041,703 }, { "LiSiGuo" ,20042,580} }; f(s) ;printf("% s % d % 3.Of\n" ,s [1]. name, s [1]. num ,s [1]. TotalScore);}程序运行后的输出结果是( )。A.SunDan 20044 550B.Penghua 20045 537C.LiSiGuo 20042 580D.SunDan 20041 703 ” 相关考题
考题 有以下程序includeincludetypedef strtlct{char name[9];char sex;floatsc 有以下程序 #include <stdio.h> #include <string.h> typedef strtlct{ char name[9]; char sex;floatscore[2]; }STU; void f(STU A){ STU b={"Zhao",'m',85.0,90.0}; int i; strcpy(a.name,b.name); a.sex=b.sex; for(i=0;i<2;i++) a.score[i]=bA.Qian,f,95,92B.Qian,m,85,90C.Zhao,f,95,92D.Zhao,m,85,90

考题 有下列程序:includeinclude "string.h"typedef struct{char name[9]; char sex;float 有下列程序: #include <stdio.h> #include "string.h" typedef struct{char name[9]; char sex;float score[2];}STU; void f(STU A) { STU b={"Zhao",'m',85.0,90.0}; int i; strcpy(a.name,b.name); a.sex=b.sex; for(i=0;i<2;i++) a.score[i]=b.score[i]; } main() { STU c={"Qian",'f',95.0,92.0}; f(C) ; printf("%s,%c,%2.0f,%2.0f\n",c.name,c.sex,c.score[0],c.score[1]); } 程序的运行结果是( )。A.Qian,f,95,92B.Qian,m,85,90C.Zhao,f,95,92D.Zhao,m, 85,90

考题 有以下程序includestruct STU{char name[10];int num;};void f(char*name, intnum){s 有以下程序 #include <string.h> struct STU { char name[10]; int num; }; void f(char *name, int num) { struct STU s[2]={{"SunDan",20044},{"Penghua",20045}}; num=s[0].num; strcpy(name,s[0].name); } main() { struct STU s[2]={{"YangSan",20041},{"LiSiGuo",20042}},*p; p=s[1]; f(p->name,p->num); printf("%s %d\n",p->name,p->num); } 程序运行后的输出结果是A.SunDan 20042B.SunDan 20044C.LiSiGuo 20042D.YangSan 20041

考题 有以下程序: include struct STU (char name[10]; int num; }; 有以下程序: #include <string.h> struct STU (char name[10]; int num; }; void f(char *name, int num) {struct STU s[2]={{"SunDan",20044}.{"Penghua",20045}}; num=s[0].num; strcpy(name,s[0].name); } main() {struct STU s[2]={{"YangSall",20041},{"LiSiGao",20042}},*p;p=s[1]; f(p->name,p->num); printf("%s%d\n",p->name,p->num); } 程序运行后的输出结果是 ______。A.SunDan 20042B.SunDan 20044C.LiSiGuo 20042D.YangSan 20041

考题 有以下程序#include "stdio.h"main(){ struct date { int number; float fenzhi; char name; }stu; printf("%d\n",sizeof(stu));} 程序的运行结果是A.3 B.5C.7 D.8

考题 有以下程序 include include int fun(int n) {int * 有以下程序 #include <stdio.h> #include <stdlib.h> int fun(int n) {int *p; p=(int*)malloc(sizeof(int)); *p=n; return *p; } { int a; a=fun(10); printf("%d\n",a+fun(10)); } 程序的运行结果是______。A.0B.10C.20D.出错

考题 有以下程序:include struct STU{char name[10]; int num;};void f1(struct STU c){ st 有以下程序: #include <stdio.h> struct STU { char name[10]; int num; }; void f1(struct STU c) { struct STU b={"LiSiGuo",2042}; c=b; } void f2(struct STU *c) { struct STU b={"SanDan",2044}; *c=b; } main() { struct STU a={"YangSan",2041}, b={"WangYin",2043}; f1(a); f2(b); printf("%d%d\n",a.num,b.hum); } 执行后的输出结果是( )。A.2041 2044B.2041 2043C.2042 2044D.2042 2043

考题 有以下程序:include include struet STU{ int nam;float TotalSeore;};v 有以下程序:#include <stdio, h>#include <string, h>struet STU{ int nam; float TotalSeore;};void f( strnct STU p){ struct STU s[2] = { {20044,550} ,{20045,537} }; p.num = s [1]. num; p.TotalScore = s [1]. TotalScore;main( ){ struct STU s[2] = {{20041,703} ,{20042,580}}; f(s[0] ); printf( "%d %3.Of\n" ,s[0].num,s[0].TotalSeore); }程序运行后的输出结果是( )。A.20045 537B.20044 550C.20042 580D.20041 703

考题 有以下程序:includeinclude struct STU {char name[10];int hum;};void f( 有以下程序:#include <stdio.h>#include <strine.h> struct STU { char name[10]; int hum;};void f(char * name,iht num){ struct STU s[2] = {{ "SunDan" ,20044} , {" Penghua" ,20045}}; num= s[0]. nnm; strepy(name,s[0], name);}main( ){ struct STU s[2] = {{"YangSan" ,20041 }, { "LiSiGao" ,20042}}, * P; p = s[1]; f(p->name,p->hum); printf("% s %d \n" ,p-> name,p->num);}程序运行后的输出结果是( )。A.SunDan 20042B.SunDan 20044C.LiSiGuo 20042D.YangSan 20041