logo image

Printing a multiline String in C Language



\n is new line character in C Language, this is used to tell compiler to goto a new line. following is a sample C Language program which prints a string in two separate lines

#include <stdio.h>

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

Output:

Hello
World!