C/C++: Exemple d’utilisation des tableaux en paramètre des fonctions

Author:


Download


#include 

void afficher_tableau(int tab[5])
 {
    int i;
    for(i = 0;i<5;i++)
	{
        printf(" %d",tab[i]);
    }

}

int main() {
    int a[5];
    int i;

    for(i = 0;i<5;i++)
	{
        a[i]=i;
    }
    afficher_tableau(a);
	return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *