-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path29.nested-struct.c
More file actions
45 lines (36 loc) · 1.02 KB
/
29.nested-struct.c
File metadata and controls
45 lines (36 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <stdio.h>
#include <stdlib.h>
struct candidateInfo{
char* name;
char* lastName;
int age;
int note;
float average;
};
struct interview{
char* interviewer;
char* interviewDate;
struct candidateInfo candidate;
int interviewNote;
};
int main() {
struct interview y;
y.interviewer = "Ahmet Yilmaz";
y.interviewDate = "25.03.2025";
y.interviewNote = 91;
y.candidate.name = "Mehmet";
y.candidate.lastName = "Colak";
y.candidate.age = 32;
y.candidate.note = 80;
y.candidate.average = 3.17;
printf("Interviewer: %s\n", y.interviewer);
printf("Interview Date: %s\n", y.interviewDate);
printf("Interview Score: %d\n\n", y.interviewNote);
printf("--------------------\n\n");
printf("Candidate Name: %s\n", y.candidate.name);
printf("Candidate Last Name: %s\n", y.candidate.lastName);
printf("Candidate Age: %d\n", y.candidate.age);
printf("Candidate Note: %d\n", y.candidate.note);
printf("Candidate Average Score: %.2f", y.candidate.average);
return 0;
}