I guessed that it will print array[0],array[1],array[2] as per the logic.If it is not printing anything then i guess it should have taken the integer size as 4.Even at that case,i think it should print the first element.Any body,have the answer for this?

the whole problem is with the for loop initialization statement. There is no segmentation fault, program gets compiled, executes and exits normally.

We expect for loop to print array elements and as it not doin any so we suspect macro for some bug...But there is no problem with macro...debugging with gdb I saw we were missing a simple concept of type cast.all the macro replacements are treated as unsigned values...n we have declared d as signed int... so as d (a signed value) is compared with the macro replaced value ( an unsigned value), d is converted in unsigend representation.

Here d is negative hence the unsigned representation comes to be very huge and that's why control is not entering the for loop and hence not printing anything...

Knowledge grows when we learn to share...pls correct me if there is any issue with above explanation...

implicit operad conversion depends on the conversion rank of the operands...Even if two operands are of same type then also they may have different conversion ranks. An operand with lesser conversion rank is converted into one with higher conversion rank.

sizeof( ) Is an Unsigned long. obviously its conversion rank is higher than that of an integer operand. That's y d is implicitly casted into unsigned long value.

Hope this clears your doubt. You can visit links to know more about conversion ranks and implicit conversion rules.