Home »
C programming language
How to print printf('Hello world.'); using printf() in c programming
Here we will learn how to print printf("Hello world."); in c programming language using printf() function?
Before, printing this statement, learn how we can print " (double quote) in c programming?
Printing " (double quote)
There is a escape sequence character \" (slash double quote), which is used to print " (double quote).
In \" - \ tells to the compiler that " (double quote) is not for syntax to start or close the printf statement, this double quote is to print on the output device.
Now consider the program which will print the printf("Hello world."); as output
#include <stdio.h>
int main()
{
printf("printf(\"Hello world.\");");
printf("\n");
return 0;
}
Output
printf("Hello world.");