C - Write program to output new line character

Requirements

Write program to output new line character

Hint

The escape sequence of new line character is \n

Demo

#include <stdio.h>

int main()/*from   w w  w  .j a va  2s .  c o m*/
{
    int ch;

    printf("Press Enter: ");
    getchar();
    ch = 'H';
    putchar(ch);
    putchar('\n');
    ch = 'i';
    putchar(ch);
    putchar('!');
    putchar('\n');
    return(0);
}

Result

Related Exercise