C/C++: Définition des constants comme paramètre

Author:


Download


#include 

void afficher_chaine(const char *chaine)
{
  while(*chaine)
      putchar(*chaine++);
}

int main(void)
{
  char str[80];

  printf("Entrer une chaîne de caractère: ");
  gets(str);

  afficher_chaine(str);

  return 0;
}

Leave a Reply

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