笔果题库
计算机二级C语言程序设计
VIP题库
搜题找答案,就上笔果题库
设有如下说明typedef struct ST{long a;int b;char c[2];} NEW;则下面叙述中正确的是______。
搜题找答案,就上笔果题库
有以下程序#include 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},{"LiSiGao",20042}},*p;p=&s[1]; f(p->name,p->num);printf("%s %d\n",p->name,p->num);}程序运行后的输出结果是______。
搜题找答案,就上笔果题库
以下叙述中正确的是______。
搜题找答案,就上笔果题库
有以下程序#include #include struct S{char name[10];};void change(struct S *data, int value){strcpy(data->name, "#");value = 6;}main(){struct S input; int num = 3;strcpy(input.name, "OK");change(&input, num);printf("%s,%d\n", input.name, num);}程序运行后的输出结果是______。
搜题找答案,就上笔果题库
若有以下程序 #include #include typedef struct stu { char name[10], gender; int score; } STU; void f( char *p ) { strcpy( p, "Qian" ); } main() { STU a={"Zhao", ''m'', 290}, b; b=a; f(b.name); b.gender = ''f''; b.score = 350; printf("%s,%c,%d,", a.name, a.gender, a.score); printf("%s,%c,%d\n", b.name, b.gender, b.score); }则程序的输出结果是______。
搜题找答案,就上笔果题库
若有以下定义:struct link{ int data;struct link *next;}a,b,c,*p,*q;且变量a和b之间已有如图所示的链表结构:a bdata next data next┌─────┐    ┌─────┐│ | │   │ | │ │ 5 | ------→ │ 9 | ││ | │ │ | │└─────┘    └─────┘cdata next┌─────┐ │ | ││ 7 | ││ | │└─────┘↑q指针p指向变量a,q指向变量c。则能够把c插入到a和b之间并形成新的链表的语句组是______。
搜题找答案,就上笔果题库
有以下程序#include #include struct S{char name[10];};main(){struct S s1, s2;strcpy(s1.name, "XXX");strcpy(s2.name, "=");s1 = s2;printf("%s\n", s1.name);}程序运行后的输出结果是______。
搜题找答案,就上笔果题库
有以下程序:struct s{int x,y;} data[2]={10,100,20,200};main(){ struct s *p=data;printf("%d\n",++(p->x));}程序运行后的输出结果是______。
搜题找答案,就上笔果题库
有以下程序#include 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]);}程序的运行结果是______。
搜题找答案,就上笔果题库
有以下程序#include struct S{ int a,b;} data[2]={10,100,20,200};main(){ struct S p=data[1];printf("%d\n",++(p.a));}程序运行后的输出结果是______。