C Program to Print Smiling face

In this tutorial you will learn about the C Program to Print Smiling face and its application with practical example.

C Program to Print Smiling face

In this tutorial, we will learn to create a C program that will Print Smiling face in C programming.

Prerequisites

Before starting with this tutorial we assume that you are best aware of the following C programming topics:

  • Operators in C Programming.
  • Basic Input and Output function in C Programming.
  • Basic C programming.
  • For loop in C programming.

Program to Print Smiling face

As we all know the String is a collection of character data types. In strings, only one variable is declared which can store multiple values. First, we will take the input number from the user for a number of smiles. Then we will Print the Smiling face using the for loop. The ASCII value of 1 is smile.

With the help of this program, we can Print a Smiling face

Algorithm:-

 

Program to Print Smiling face:-

 

Output:-

In the above program, we have first initialized the required variable.

  • smile= It will hold the integer value 1 which is a smile in ASCII.
  • i = It will hold the integer value for controlling the for loop.
  • limit = It will hold the integer value for the number of smiles.

Taking the input number of smiles.

Printing the output smile.

In this tutorial we have learn about the C Program to Print Smiling face and its application with practical example. I hope you will like this tutorial.