목차
1. 구조체 이름이 student 이고 멤버가 아래와 같은 구조체를 선언.
구조체명 student
멤버명 name[10] kor eng math tot avg
형식 char int int int int double
2. 다음 박스와 같이 data.txt 파일을 만들고 파일로부터 데이터를 읽어서 구조체 배열(stu)에 저장하는 리턴타입 Read_Data(매개변수 리스트)를 작성.
3. 구조체 배열의 내용(이름, 국어, 영어, 수학, 총점, 평균을 출력하는 함수를 작성.
구조체명 student
멤버명 name[10] kor eng math tot avg
형식 char int int int int double
2. 다음 박스와 같이 data.txt 파일을 만들고 파일로부터 데이터를 읽어서 구조체 배열(stu)에 저장하는 리턴타입 Read_Data(매개변수 리스트)를 작성.
3. 구조체 배열의 내용(이름, 국어, 영어, 수학, 총점, 평균을 출력하는 함수를 작성.
본문내용
#include
#include
#include
#define MAX 5
// 구조체 선언.(구조체 이름 : student)
typedef struct student{
char name[10]; //이름
int kor; //국어점수
int eng; //영어점수
int math; //수학점수
int tot; //총점
double avg; //평균
}STUDENT;
void Read_Data(STUDENT *stu);
void Print_Out(STUDENT *stu);
#include
#include
#define MAX 5
// 구조체 선언.(구조체 이름 : student)
typedef struct student{
char name[10]; //이름
int kor; //국어점수
int eng; //영어점수
int math; //수학점수
int tot; //총점
double avg; //평균
}STUDENT;
void Read_Data(STUDENT *stu);
void Print_Out(STUDENT *stu);
추천자료
c로배우는알고리즘에서 ROBOT프로그램을 C언어로 바꾸자.
C언어 야구 게임
C언어를 이용해 하노이탑 구현 프로그램
C언어를 이용한 분수의 덧셈과 곱셈을 하는 프로그램
C언어를 이용해 문자열을 추출하는 프로그램
C언어를 이용한 야구게임(숫자맞추기) 프로그램
C언어를 이용한 성적처리(성적관리) 프로그램
C언어를 이용한 [3][3]행렬(3*3행렬), 행렬의 덧셈과 행렬의 곱셈
C언어 처음공부하는 사람들에게 도움이 되는 코딩들(기초부터 포인터까지)
C언어 학생성적의 총점과 평균 구하는 프로그램
c언어로 만든 typedef 구조체 개념 프로그램
c언어 계산기
c언어로 애니메이션을 만들어 주세요
c언어에서의 포인터(pointer)
소개글