C printf function

  • C printf function is predefined function. By using this function, we can print data on console.
  • While working with printf(), it can take any number of arguments but first argument must be within the double quotes(“”) and every argument should separated with comma(,).
  • The scientific name of the monitor is called.
  • Within the double quotes, whatever we pass it prints same, if any format specifiers are there, then that copy the type of value.

Format specifiers:
Format specifiers will indicate that, what kind of data need to be printed of console.

int –> %d
float –> %f
char –> %c


printf(“Welcome to k2schools”);
printf(“Welcome to K2SCHOOLS”);
printf(“%d Welcome % d”,10,20);

Powered by k2schools