How to break a line in C programming language
Notes:
How to break a line in C programming language
Example Code:
#include<stdio.h>
int main()
{
printf("Hello World\n");
printf("Hello World\n");
printf("Hello World");
return 0;
}
Declaration of printf function:
int printf(const char*,…);
int: is a return type, printf function returns number of characters printed successfully.
printf: is a standard output function declared inside the stdio.h header file.
printf is used to display some text to the console (standard output).
printf means print formatted text to the standard output (console).
const char *: is an essential argument, const char * indicates we need to pass “sequence of characters enclosed in double quotations”.
… : indicates additional arguments, variable length arguments
\n:
\n is an escape sequence character used to add line break in the console output.
It works like an enter key, when used it moves the cursor to the Nextline.