Puts Vs Fputs

Both puts and fputs are used for printing. Similar to printf but printf is optimised for printing with format string.

Whereas puts and fputs are for printing without formating (without the %s and stuff)

puts

puts will automatically add a newline character in the end after printing

For example:

puts("hello world");
puts("hello world");
hello world
hello world

fputs

fputs will not modify the string. Hence no adding newline and print as it. However you need to put output stream as the api.

For example:

fputs("hello world");
fputs("hello world");
hello worldhello world