0

How to print out name and surname in a 2d array?

Hello! How can I print out name and surname if I have a 2d array. I've tried this: char name[10][100]; int i; for(i=0;i<2;i++){ printf("type name"); fgets(name,100,stdin); printf("%s\n",name[i]);}

27th Apr 2019, 2:35 PM
MargaritaK
2 Antworten
+ 1
fgets(name[i],100,stdin);
27th Apr 2019, 3:57 PM
kiRA
kiRA - avatar
0
kiRA thank you! I didn't see it!
27th Apr 2019, 4:11 PM
MargaritaK