Je ne pense pas que cela vienne de la version de ton compilo. En jetant un petit oeil à la doc de scanf on trouve :
s Matches a sequence of non-white-space characters;
the next pointer must be a pointer to char, and the
array must be large enough to accept all the
sequence and the terminating NULL character. The
input string stops at white space or at the maximum
field width, whichever occurs first.
Donc, la doc dit que le texte entré s'arrête sur un espace ou si la longueur maximale est atteinte.
[^] # Re: j'ai oublié de préciser
Posté par gerald dumas . En réponse au message scanf s'arrête au espaces. Évalué à 2.
Je ne pense pas que cela vienne de la version de ton compilo. En jetant un petit oeil à la doc de scanf on trouve :
s Matches a sequence of non-white-space characters;
the next pointer must be a pointer to char, and the
array must be large enough to accept all the
sequence and the terminating NULL character. The
input string stops at white space or at the maximum
field width, whichever occurs first.
Donc, la doc dit que le texte entré s'arrête sur un espace ou si la longueur maximale est atteinte.