when i launch this 2 lines of code
printf("|%-16s|%-16s|%-16d|\n","name","surname", 30);
printf("|%-16s|%-16s|%-16d|\n", database_publishers[pointer1].name, database_publishers[pointer1].client, database_publishers[pointer1].price);
it gives me output like this:
|name |surname |30 |
|name
|surname
|30 |
image:
variables in second printf call were got from user in other function, using fgets call like this
fgets(database_publishers[pointer].name, STRING_SIZE, stdin);
there are no any \n in this function and i have no idea why does it print every variable in new line. btw i work in visual studio, maybe it matters, idk, im just a rookie in programming