C - Output formatted text to console

Introduction

The printf() function sends a formatted stream of text to the standard output device.

It has the following syntax:

int printf(const char *restrict format, ...); 

For abbreviated format, you can use the following code to print text onto console window:

printf("text"); 

The printf() function requires the stdio.h header file.

Demo

#include <stdio.h>

int main()//from ww w. j  av a 2s.  co m
{
    printf("hi from book2s.com.");
    return(0);
}

Result

Related Topic