@priya Because precedence of + operator is greater than "<<" operator . So
evaluation of expression a <<2 + a will be

a<<(a+2)





On Sat, Feb 5, 2011 at 6:35 PM, priya mehta <[email protected]>wrote:

> sure thanks:)
>
>
>
> On Sat, Feb 5, 2011 at 6:26 PM, Gajendra Dadheech <[email protected]>wrote:
>
>> @priya u seems to be a beginner in c programming...
>> I would suggest u to go through Dennis richie.....
>>
>> Thanks and regards,
>> Gajendra Dadheech
>>
>>
>>
>>
>> On Sat, Feb 5, 2011 at 2:53 PM, Manmeet Singh <[email protected]>wrote:
>>
>>> because u not thinking of operator precedence :P :P
>>>
>>>
>>> On Sat, Feb 5, 2011 at 2:52 PM, priya mehta <[email protected]>wrote:
>>>
>>>> why is this happening?
>>>>
>>>>
>>>>
>>>> On Sat, Feb 5, 2011 at 2:51 PM, Manmeet Singh <[email protected]>wrote:
>>>>
>>>>> 8, 32, 96
>>>>>
>>>>> On Sat, Feb 5, 2011 at 2:46 PM, priya mehta 
>>>>> <[email protected]>wrote:
>>>>>
>>>>>> #include <stdio.h>
>>>>>>   #define PrintInt(expr) printf("%s : %d\n",#expr,(expr))
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>   *int* FiveTimes(*int* a)
>>>>>>   {
>>>>>>       *int* t;
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>       t *=* a*<<*2 *+* a;
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>       *return* t;
>>>>>>   }
>>>>>>
>>>>>>   *int* main()
>>>>>>   {
>>>>>>       *int* a *=* 1, b *=* 2,c *=* 3;
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>       PrintInt(FiveTimes(a));
>>>>>>       PrintInt(FiveTimes(b));
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>       PrintInt(FiveTimes(c));
>>>>>>       *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.
>>>>>
>>>>
>>>>  --
>>>> 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.
>>>
>>
>>  --
>> 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.
>

-- 
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