Function name : printf
Header file : <stdio.h>
Function prototype: int printf(char *format...);
Function : Function that generates formatted output
Parameters : char *format... format to be output
Return value : The total number of characters written is returned on success, and a negative number is returned on failure.
Program example : Output the number 10 in decimal, octal, hexadecimal and different lengths
#include<stdio.h>#include<string.h>#defineI555#defineR5.5intmain(void){inta=10;printf(%d,%o,%xn,a,a,a);printf( %5dn,a);return0;}
Running results
10,12,a10