Official Site

click here to view our new site launched

Pages

Thursday, March 25, 2010

Code Challenge Solved

March 2010 Contest




March Coding Contest Solved


c










Beautiful coding:


What to know how to code without using semicolon?

void main(int a ,int b)
{
if(clrscr(),printf("\nEnter two integers:"),scanf("%d %d",&a,&b))
while(printf("\nSuccessful addition:%d",a+b),getch(),0)
{ }
}


Program without header file?


So continuing in the series of program without, here are two more programs. The first one is just a valid C program without any header file.
1int main()
2{
3 return 0;
4}
The above program will actually compile and run.
But you will say it did nothing. So lets have a program without header file which prints something.

01extern "C"
02{
03 int printf(const char *format,...);
04}
05
06int main()
07{
08 printf("Hello World");
09 return 0;
10}
$2.49 .COM at GoDaddy.com! Expires 5/14/13