Print given statement - C Program

C program to print: Welcome to TutorialRide.

Solution:

In this program, we will learn how to print "Welcome to TutorialRide" with the help of printf function. This function is included in stdio.h (standard input output header file) hence we include this header file with preprocessor command (#include). We use horizontal tab (\t) and new line (\n) to format an output. We can print multiple line using new line wherever required.

#include <stdio.h>
int main()
{
      printf("Welcome \t to \nTutorialRide");  
      return 0;
}


Output:

print message

In the above output, after printing "Welcome" extra space is printed because we have given \t in printf statement and after printing "to" \n is there hence "TutorialRide" is printed on a new line.