February 15, 2011

Funny C Program


Here is one more tricky code, its so simple and funny.
Compile and then give anything in input and see if its funny or not.


Code:

#include<stdio.h>
#include<conio.h>
void main()
{
char ch[]="I AM AN IDIOT.";
char c='A';
int i=0;
while(c)
{
c=getch();
printf("%c\a",ch[i]);
i++;
if(i==14)
{
printf(" "); i=0;
}
}
}

Hope you liked the post.. :)

Related Posts :



Categories: ,

2 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Related Posts with Thumbnails