the answers
are

poy[i]  = 1
pot[i] = 2
pot[i] = 8
pot[i] = 64
On Mon, Sep 5, 2011 at 7:55 PM, sukran dhawan <[email protected]>wrote:

> well
>
>
>   #define SIZEOF(arr) (sizeof(arr)/sizeof(arr[0]))  gives the number of
> elements ie sizeof whole array /sizeof first element
>
> second macro
>
> #expr - prints variable name
>
> and if value is preceded is 0 it means it s in octal formt.it is printed
> in decimal format by conversion
> hope i am clear
>
>
>
> On Mon, Sep 5, 2011 at 7:48 PM, Mohit Goel <[email protected]>wrote:
>
>> 1) #include <stdio.h>
>>    #include <stdlib.h>
>>
>>    #define SIZEOF(arr) (sizeof(arr)/sizeof(arr[0]))
>>
>>    #define PrintInt(expr) printf("%s:%d\n",#expr,(expr))
>>    int main ()
>>   {
>>        /* The powers of 10 */
>>        int pot[] = {
>>             0001,0010,0100,1000
>>
>>        };
>>        int i;
>>
>>        for(i=0;i<SIZEOF(pot);i++)
>>            PrintInt(pot[i]);
>>        return 0;
>>   }
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to