void read_class_information(head* beginning, int scale_type) { puts(\"hello\"); // printf(\"hello\"); }
I have a simple function called by main
Because printf() does not flush the output stream automatically. On the other hand puts() adds a new line '\n' at the end of the passed string. So it's working because the '\n' flushes de stdout.
printf()
puts()
'\n'
stdout
Try
printf("hello\n");
Or, explicitly flush stdout
fflush(stdout);
right after the printf() statement.