为您找到"

char name[20]; int num; scanf("name=%s num=%d",na

"相关结果约100,000,000个

帮帮忙修改这一道C语言题,急急急急急急急急急急急急急急急急急急急急...

int i,j=0,k=0; float b=0,max; struct student { int num; char name[100]; float grade; }a[100]; if((fp=fopen("D:\\test.txt","w"))==NULL) { printf("can not open this file\n"); exit(0); } for(i=0;i<100;i++) { scanf("%d",&a[i].num); if(a[i].num==0...

C语言考试的几道问题

char num[6];char name[8];int score[4];} stu[N];void input(struct student stu[]){ /***FOUND***/ int i,j;for(i=0;i<N;i++){ printf("\n please input %d of %d\n",i+1,N);printf("num: ");scanf("%s",&stu[i].num);printf("name: ");scanf("%s",&stu[i...

C语言scanf语句

函数原型:int scanf(const char *format,...);说明:scanf() 是从标准输入流stdio (标准输入设备,一般是键盘)中读内容的通用子程序,可以说明的格式读入多个字符,并保存在对应地址的变量中。其调用形式为: scanf("<格式说明字符串>",<变量地址>);变量地址要求有效,并且与格式说明的次序一致。使...

scanf (“%s”,name)与scanf (“%c”,&name) 有什么分别。

scanf (“%s”,name)——从键盘接收一个字符串,存储到以name为首地址的数组中;scanf (“%c”,&name)——从键盘接收一个字符,赋给变量name;如果name是数组名,则将其低字节赋以从键盘输入的字符的ASCII码。由于逻辑错误,常常导致安全问题。scanf (“%c”,name)——从键盘接收一个字符,赋...

...="what is your name ?"; char name [ 20]; printf("%s\n",s...

不是你说的那个意思,这里的20只是表示这个数组一共有20个元素,也可以看成意思是这个数组占用内存为20个字符大小,my name is是这20个元素的一部分,如果你之前没有给字符串赋初值(你这里就是),那么s这个元素后面一个元素的内容是\0,再之后的9个元素内容为任意的 ...

C语言编程,高手请进,谢谢

long int num; char name[20]; int age; char sex[4]; char birthday[10]; char address[30]; long int tele_num; char E_mail[20]; struct student *next; }; int TOTAL_NUM = 0; struct student *head = NULL; void welcome(); void mainmenu(); void record(); void insert(struct ...

C语言问题!!

改了下你的程序,调试结果正确 include<stdio.h> include<stdlib.h> include<math.h> define LEN sizeof(struct singer)define JUDGENUM 3 struct singer { int num; //Ñ¡ÊÖ¿¼ºÅchar name[20];//Ñ¡ÊÖÐ&...

C语言题目。

define N 30struct stu{char name[20];int score;};void find(struct stu *p,int x){int i;for(i=0;i<N;i++)if(p[i].score==x){printf("%s\t%d\n",p[i].name,p[i].score);return;}printf("Not find %d...\n",x);}void mymax(int *y,int i){(*y)=i;}void ...

...N 10 struct Student {int num;char name[20];char sex;float sc...

我测试了你的程序, 可以按照学号排序, 但是你没有输出语句, 加上输出语句就可以了:如, 加在abc函数中:int abc(struct Student stu[]){ int i,j;struct Student t;for(j=0;j<N-1;j++)for(i=0;i<N-j;i++)if(stu[i].num>stu[i+1].num){t=stu[i];stu[i]=stu[i+1];...
1 2 3 4 5 6 7 8 9

相关搜索