初学C编程,求高手帮忙。
应该怎么改呢?编译有错。3Q
追答#include
#include
#define LEN sizeof(struct student)
struct student
{
char name;
};
有这部分啊,是不是调用时出错了?3Q
追答那得把你的完整内容拿出来呀,其实主要是你用编译器编译一下,看下错误提示,应该就说的很明白了
请大神尽可能详细地注释下面的数据结构程序,谢谢
define LEN sizeof(struct Student) \/\/宏定义长度 struct Student {\/\/学生结构体,是一个链表 long num; \/\/数据 应该是学号 float score; \/\/数据分数 struct Student*next; \/\/链表指针,指向下一个节点 };int n;struct Student*creat(){\/\/初始化链表 struct Student*head; \/\/表...
高分求大神给代码注释,c语言 代码作用是用函数insert向一个动态链表插入...
define LEN sizeof(struct student)struct student\/\/定义一个结构体 { long num;\/\/应该是学号 float score;struct student *next;};int n;int main(){ struct student *creat();struct student *insert(struct student *, struct student *);void print(struct student *);struct student *head,...
帮忙看下这程序 出现内存不可用
include<stdio.h> include<malloc.h> define LEN sizeof(struct student)struct student { long num;float score;struct student * next;};int n;struct student * creat(){ struct student *p1,*p2,*head;n=0;p1=p2=(struct student *)malloc(LEN);printf("输入学生学号,分数\\n");scanf...
...NULL 0 #define LEN sizeof(struct student)
最大的问题出在你的数据写入,也就是你的 scanf("%s,%d,%s,%.0f",&p1->name,&p1->num,&p1->grade,&p1->tel_num);\/\/有问题 要读入字符串是,你用‘,’作分隔符显然是不可取的,因为系统会把','当做字符串中的一个字符读入,因此你输入一长串的数据,实际上都赋给了char name[10]...
C语言小程序,不知为何进入了无限循环……希望帮忙改正问题
include<stdio.h> include<malloc.h> include<stdlib.h> define LEN sizeof(struct student)struct student { int num;float score;struct student *next;};int n;struct student *creat();void print(struct student *head);int main(){ struct student *stu;stu = creat();print(stu);printf...
有十个学生。每个学生包括学号,姓名,和三门成绩。从键盘输入十个学生的...
include<stdio.h> include<malloc.h> define null 0 define len sizeof(struct student)struct student { int num;char name[20];int score[3];struct student *next;};int n;struct student *creat(){ struct student *head,*p1,*p2;p1=p2=(struct student*)malloc(len);scanf("%d,%s,%d...
编写函数生成含有N个节点的,带头结点单向动态链表,并输出链表。_百度知 ...
我把我的宝贝给你 单向动态链表的创建、输入、插入、删除、输出 #include <stdio.h> #include <malloc.h>\/*如以Turbo C作编译工具请删除此句*\/ #define LEN sizeof(struct student) struct student { long num; char name[20]; float score; struct student *next; }; int n...
Visual FoxPro程序设计学生成绩管理系统要求 学生成绩录入、修改 查 ...
#include <stdio.h>#include <stdlib.h>#include <malloc.h>#include <winsock2.h>#define LEN sizeof(Student)typedef struct student{ int num; char name[20]; int score[4]; int sum; struct student *next;}Student;int n;Student *cin(void); Student *sort_1(Student *head,int); void sort...
c语言程序
#include <malloc.h>#include <stdio.h>#include <stdlib.h>#define LEN sizeof(struct scorenode)#define DEBUG#include <string.h>struct scorenode{int number;\/*学号*\/char name[10];\/*姓名*\/float cyuyan;\/*c成绩*\/float vbyuyan;\/*vb成绩*\/float sqlyuyan;\/*sql成绩 *\/struct scorenode *next;...
编程如何用C语言编写一个学生成绩管理系统程序
#include <malloc.h>#include <stdio.h>#include <stdlib.h>#define LEN sizeof(struct scorenode)#define DEBUG#include <string.h>struct scorenode{int number;\/*学号*\/char name[8];\/*姓名*\/float cj1;\/*成绩1*\/float cj2;\/*成绩2*\/float cj3;\/*成绩3 *\/struct scorenode *next;};typedef ...