Use of printf() function in C

Description


printf() is a built-in function.
C does not contain any instruction to display output on screen rather it uses a readymade libraty function printf() to achieve it.
For us to be able to use the printf() function, it is necessary to use #include<stdio.h> at the beginning of the program.

the general form of printf() fuction is,
printf(“<format string>”,<list of variables>);

<format string> can contain,

Symbols Working
%d For taking integer value
%c For taking a character
%s For taking String
%f For taking float and double value

It also prints that strings on the output window what are written within its parenthesis’s quotation like (“ ”).

OUTPUT

Author Description

humanz

Our mission is to bring the affordable Technology education to people everywhere, in order to help them achieve their dreams and change the world. - Follow @program_guide

No comments yet.

Join the Conversation