Q.21 Write a program to fill the entire screen with a smiling face. [Hint : the smiling face has an ascii value 1]
==>code goes like this:
/* Printing smile faces */
#include<stdio.h>
int main()
{
int i=1,j;
for(j=1;j<=9900;j++)
printf("%c",i);
return 0;
}
Output:
I have used Dev CPP to compile this program.
If you are using Turbo C++ IDE, then use conio.h in link section after stdio.h
and use getch(); to hold the output screen, just before the end of main function.
If you have any confusion regarding the program, please, comment below.
Happy Coding !
Thank you
Home / ascii value 1 in c /
C Programs /
Printing smiling faces in c
/ Printing smiling faces to fill the entire screen in C
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 comments:
Post a Comment