Wednesday, 30 November 2011

concept of printf function using c language;printf function

Printf Function:
It is used to display output on the monitor.It is most commonly used for displaying output on screen.It can display the output of any Text,constants or the values of variable in specified format.

syntax of printf:
printf(format string, argument_list);

format string = Any thing written in double quotation marks is format string.The other name of format string is Control string.
eg: "Your using c language" or "Your ph no. is 2323223" etc

Argument List = consists of constants , variables or any expression which is going to be printed on screen.
eg: printf("we are in c"); this example contain no argument

now printf("Your marks are %d",m); this example have one argument that is %d related to m.The value of m store in %d and %d is used for integer values.


Post a Comment