getchar(void): retourne le caractère lu

Author:


Download

/*
int getchar( void );

*/

  #include 

  int main(void)
  {
    char str[256], *p;

    p = str;
    printf("Tapez un caractère:");
    while((*p++ = getchar())!= 'q');
    *p = ''; /* Ajouter le caractère de fin de ligne*/

    printf(str);

    return 0;
  }

Leave a Reply

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