Join Regular Classroom : Visit ClassroomTech

printf() Statement

"printf()" statement :

“printf()” is a C library function from the header file “stdio.h”(stdio – standard input output), which sends the console output to stdout.

Example :

“printf()” returns the number of printed characters, that is an integer value.

Let’s see this through an example:

Explanation:

Here we have declared a integer variable “P” which prints “Hello World!” in the first line. Now we are printing the value of variable “P”. Here the space between “Hello” and “World” is treated as an “\o” character. Therefore the number of total character is 12 in the string “Hello’\o’World!”, and including “\n”, there is total number of character is 13.

Recent Posts