Blog Moved

This website completely moved to new domain. For latest content, visit www.programmingposts.com

Search This Blog

9 Oct 2012

HOW TO PRINT SMILING FACE USING C PROGRAM


/** c program to print smiling face or ASCII symbol of 2**/

#include<stdio.h>
main()
{
  int a=2,i;
  for(i=0;i<250;i++) //prints smiling face symbol 250 times
     printf("%c",a);  //instead of this u can also write
                     //printf("%c",2);
}

Output:


Explanation: Here we are just printing the ASCII symbol of 2 which looks like a smiling face. The ASCII symbol of 1 also looks similar to this check here

1 comment: