×

C Tutorial

C Basics

C Data Types

C Input/Output

C Operators

C Conditional Statements

C Control Statements

C Strings

C Functions

C Arrays

C Structure and Unions

C Pointers

C Preprocessor Directives

C Command-line Arguments

C File Handlings

C Graphics

C Advance Topics

C Tips and Tricks

C Important Topics

C Practice

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.");



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.