How to Write a C Program to fill the entire screen with a smiling face in C Programming Language ?
The smiling face has an ASCII value 1.An infinite loop like the following can also do the job.
for (i=1;i<=1000;)
- #include<stdio.h>
- main()
- {
- int i, j;
- for (i=1, j=1; j<=5000; j++)
- {
- printf("%c", i);
- }
- }
This following C Program also displays smiling face very clearly try it :
- #include
- main()
- {
- int i;
- for(i=0;i<=2559;i++)
- {
- printf("%c",2);
- }
- }
You can use any int instead of 2 thats just for what you want to print on screen. n char is not used because you have only integers have this smiling faces ASCII char has 66 77 like ASCII value.