C Program to Print Smiling Face on Screen

To print smiling face on the screen in C programming, use ASCII value of smiling face, which is 1.

Following C program asks from user to enter the number of smiling face he/she wants to print on the screen to print the required number of smiling face on the screen:

#include<stdio.h>
#include<conio.h>
void main()
{
   clrscr();
   int sml=1, i, limit;
   printf("How many smiley face you want to print ? ");
   scanf("%d",&limit);
   for(i=0; i<limit; i++)
   {
      printf("%c ",sml);
   }
   getch();
}

When the above c program is compile and executed, it will produce the following result:

c program print smiling face

You can also format the output screen of the smiling face as per your requirement

Same Program in Other Programming Language

You may also like same program in other programming language:

C Online Test


« Previous Program Next Program »



Like/Share Us on Facebook 😋