+ 1

I have an issue with duplicate struct for loop here

String from struct mk1[i].name = "Al fathir abi dharmawan" is out twice/duplicated https://code.sololearn.com/c1sNe28p87kg/?ref=app

29th Jun 2023, 10:58 AM
LemonKitana
LemonKitana - avatar
2 Answers
+ 3
your char auth[5] buffer is too small you should use at least auth[6] try typedef struct { char name[100]; char auth[10]; } murid; or just use typedef struct { char* name; char* auth; } murid;
29th Jun 2023, 11:48 AM
Bob_Li
Bob_Li - avatar
+ 2
Thanks mate!
29th Jun 2023, 11:50 AM
LemonKitana
LemonKitana - avatar