DemonWolf
Centipat
- Katılım
- 11 Mart 2020
- Mesajlar
- 11
C:
#include <stdio.h>
#include <string.h>
#define NUM_STUDENTS 3
typedef struct{
char name[50];
char lastName[50];
int studentId;
double mid1Grade;
double mid2Grade;
double finalGrade;
double average;
}Student;
typedef struct{
char courseName[50];
char courseCode[20];
Student myStudentArray[NUM_STUDENTS];
int currentStudentCount;
}Course;
struct Student * findId(int id, Course *myCourse){
int i = 0;
struct Student * student;
while(i < NUM_STUDENTS){
if (myCourse -> myStudentArray[i].studentId == id){
student = &myCourse -> myStudentArray[i];
return student;
}
i++;
}
return NULL;
}
Bu uyarıyı alıyorum yardım edebilir misiniz?