Wednesday, August 10, 2011

Coding Puzzles No. 6?

#include<stdio.h>

void main()
{
        char s[]="\0";
        printf("%d - %d\n",printf("%s",s),sizeof(s));
}



Tuesday, August 9, 2011

Coding Puzzle No. 5?

#include<stdio.h>

void main()
{
         char s[]="four";
         printf("%d\n",puts(s));
}


Coding Puzzle No. 4?

#include<stdio.h>

void main()
{
         char s[]="four";
         printf("%d\n",printf("%s",s));
}




Monday, August 8, 2011

Coding Puzzle No. 3?

#include <stdio.h>
#define x 10

void foo()

{
        #undef x
        #define x 20
}


void main()

{
        printf("%d\n",x);
        foo();
        printf("%d\n",x);
}


Coding Puzzle No. 2?

#include <stdio.h>
#define x 10

void foo();

void main()
{
        printf("%d\n",x);
        foo();
        printf("%d\n",x);
}

void foo()
{
        #undef x
        #define x 20
}



Numero Uno!

#include <stdio.h>

void main()

{
        int x=1;
        printf("%d\n",x);
        #define x 20
        printf("%d\n",x);
}