Witam
W jaki sposób ( jeśli jest to możliwe) mogę skonstruować if'a aby po wykonaniu scanf pojawiał się komunikat że napis wychodzi poza zakres ?
#include <stdio.h>
int main()
{
char tab[5];
scanf("%s",tab); // -> witamm
printf("%s \n",tab); // -> witamm
for ( int i = 0 ; i < 5 ; i++){
printf("%c",tab[i]); // -> witam
}
printf("\n");
return 0;
}