Programmation en c

Fermé
abdou - 7 mai 2010 à 13:31
Steefif Messages postés 485 Date d'inscription lundi 7 juillet 2008 Statut Membre Dernière intervention 15 février 2013 - 7 mai 2010 à 13:38

comment declarer un tableau type chaine en c ?

exemple
dim nom(n) as string en vb

ou
var
nom:array[1..20] of string ;

son equivalent en c

merci

2 réponses

Thiphariel Messages postés 49 Date d'inscription mardi 13 avril 2010 Statut Membre Dernière intervention 31 août 2010 11
7 mai 2010 à 13:35
char tab[50]; par exemple
1
Steefif Messages postés 485 Date d'inscription lundi 7 juillet 2008 Statut Membre Dernière intervention 15 février 2013 19
7 mai 2010 à 13:38
Thiphariel ca correspond à un tableau de caractere ca

pour un tableau de chaine : char tab[x][y]
tableau de chaine de taille x caractere et tailel du tableau y

ou sinon char* tab[50]
mais il faut faire attention a ta mémoire
0