0
How I can assign value for any struct to another struct?
Suppose If I have three students I wanna I build struct for Name Age And Avrage. I will enter the data for tow students and I wanna Assign data for the first student to the third student?
3 ответов
+ 2
Do you want 1 struct that contains the data of all 3 students?
Or 1 struct for each student?
+ 1
1. Define a struct with name, age and avg fields, use arrays
2. Initialize struct, set data of student 1
3. Get input and assign to struct's arrays
4. Assign data of 1st to 3rd
0
1 for all 3 student