C: Verifier si l’entrée est un caractère de saut de ligne avec ‘isspace()’

Author:


Download


  #include 
  #include 

  int main(void)
  {
    char ch;

	printf("tapez 'q' pour quittern");
    for(;;) {
        ch = getchar();

        if(ch == 'q')
		{
            break;
        }
        if(isspace(ch)){
            printf("%c Vous avez tapé la touche espace", ch);
        }

    }

    return 0;
  }

Leave a Reply

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