data structures using note in case of reading stringswe do not use the sign in the scanf function printf(the printf function is used to display information required by the user and also prints the values of the variables its syntax can be given asprintf ("control string"arg ,arg ,arg ,argn)after the control stringthe function can have as many arguments as specified in the control string the control string contains format specifiers which are arranged in the order so that they correspond with the arguments in the variable list it may also contain text to be printed such as instructions to the useridentifier namesor any other text to make the text readable note that there must be enough arguments because if there are not enough argumentsthen the result will be completely unpredictable howeverif by mistake you specify more number of argumentsthe excess arguments will simply be ignored the prototype of the control string can be given as below%[flags][width]precision][modifier]type each control string must begin with sign flags is an optional argumentwhich specifies output justification like decimal pointnumerical signtrailing zeros or octadecimal or hexadecimal prefixes table shows different types of flags with their descriptions table flags in printf(flags description left-justify within the given field width displays the data with its numeric sign (either or -used to provide additional specifiers like oxx xor for octal and hexadecimal values respectively for values different than zero the number is left-padded with zeroes ( instead of spaces width is an optional argument which specifies the minimum number of positions that the output characters will occupy if the number of output characters is smaller than the specified widththen the output would be right justified with blank spaces to the left howeverif the number of characters is greater than the specified widththen all the characters would be printed precision is an optional argument which specifies the number of digits to print after the decimal point or the number of characters to print from string modifier field is same as given for scanf(function type is used to define the type and the interpretation of the value of the corresponding argument the type specifiers for printf function are given in table the most simple printf statement is printf ("welcome to the world of language")the function when executed prompts the message enclosed in the quotation to be displayed on the screen for float the following examples show output under different format specificationsprintf ("% "xprintf("% " )