I have a char nom[100]; but when a nom‘s size is less than 100 I have to use padding.
I use the char ‘.’ to proceed.
But when I read data I see for example a.txt..............................................................................................
How can I do to remove the padded ‘.’ in C ?
You can either initialize your char *nom, like this:
Or insert a ‘\0’ after the length you want the string “nom” to have, like this: