Salut!
La norme (98/99 chapitre 6.5.8 point 8) précise:
Cela signifie t'il que l'on peut utiliser sans risque l'élément suivant la fin du tableau pour faire des choses comme:If both the pointer
operand and the result point to elements of the same array object, or one past the last
element of the array object, the evaluation shall not produce an overflow; otherwise, the
behavior is undefined. If the result points one past the last element of the array object, it
shall not be used as the operand of a unary * operator that is evaluated.
Autrement dit est il garantie que cette case mémoire ne peut pas servir à stocker une autre variable ou cela signifie t'il juste que cette case ne pointe pas en dehors de la zone allouée au programme?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 char s[10]="1234567890"; s[10]='\0';
Merci.
Partager