--------------------------------------------------------------------------------------------------
What is Printf() in C ?
What is Printf() in C ?
printf () is a function, which is use in
programming language (C) for print something on screen.
It
is an predefined function in the "stdio.h" header file.
--------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------
Steps to write printf() function -
Step
1:
Write printf.
Step 2:
Write which have to print in between " " double inverted comma in between parentheses ( ).
Step 3:
After parentheses write ; semicolons.
--------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------
Program
to print Hello Word using printf() function -
#include <stdio.h>
#include <conio.h>
main ()
{
printf("Hello Word");
}
--------------------------------------------------------------------------------------------------
Commands to perform C program in Turbo C++
Create a new file : File > new.
save program : F2 > file_name.c
compile : Alt + F9
execute : Ctrl + F9
--------------------------------------------------------------------------------------------------
Commands to perform C program in Linux OS
Create a new file : Terminal > gedit file_name.c
save program : save
compile : gcc file_name.c
execute : ./a.out
--------------------------------------------------------------------------------------------------
Program to print Hello Word using printf() function in Turbo C++
Output in Turbo C++
Program to print Hello Word using printf() function in Linux OS
Output in Linux OS
Thank You
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


