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
|
# include<stdio.h>
# include<string.h>
struct eleve
{
char nom[100];
char prenom [100];
int age;
};
struct nClass
{
char nom[5];
char maitresse [26];
struct eleve tableEleves [32];
};
void Afficher_Eleve ( struct nClass param,int i);
main ()
{
struct eleve Moi = {"yop","la",1};
struct nClass test;
Afficher_Eleve (test,0);
}
void Afficher_Eleve ( struct nClass param, int i)
{
printf ("Nom = %-10.10s | ",param.tableEleves[i].nom);
printf ("Prenom = %-10.10s | ",param.tableEleves[i].prenom);
printf ("Age = %d\n",param.tableEleves[i].age);
} |
Partager