General-purpose format conversion function that will output the given arguments with a given format to stdout.

Example: printf("%d %4 haha", 7,2314); 7 2314 haha

% formats

symbolmeaning
%ddecimal integer
%ffloat
%1-9a character of length (1-9). example is printf(“%5f”, 23143);
$.1-9requests (1-9) digits after the decimal place. example is printf(“%1.2f”,6.23);
%ooctal integer
%xhex int
%ccharacter
%sstring
%%just for % itself