Skip to main content

How to print in next line

To print text in new line, we use '\n' character which moves the cursor to the next line.

#include <stdio.h>

int main()
{
    printf("Hello\nWorld!");

    return 0;
}

OUTPUT :

Hello
World!

Similarly '\t' generates one tab space in a line.

Comments