Print text on separate lines in C
printf() - Question 1
In this question, we will see how to print multiple text on separate lines in C programming using the printf() function. To know more about printf() function click on the printf() function lesson.
Q1) Write a program in C to print the name of 5 countries on separate lines on the screen.
Program
#include <stdio.h>
#include <conio.h>
int main()
{
printf("India\n");
printf("Australia\n");
printf("England\n");
printf("United States of America\n");
printf("China");
return 0;
}
Output
India Australia England United States of America China