C - Write program to add new line character to the middle of string literals

Requirements

A single string variable can hold two lines of text.

Write program to add new line character to the middle of string literals

Hint

The new line character is \n which can be used in string literal.

Demo

#include <stdio.h> 
         // www  .  ja v a  2  s . c  o m
int main() 
{ 
      char prompt[] = "Press Enter to explode:"; //Line 5
         
      printf("%s",prompt); 
      getchar(); 
      return(0); 
}

Result

Related Example