@sanchit:it is undefined..

On Sun, Jul 31, 2011 at 1:47 AM, Sanchit Manchanda <sanchit...@gmail.com>wrote:

> I am getting b=2.
> Maybe coz we are assigning 2 to b then incrementing b. But still acc to me
> it should be 3.
> :-\
> No warnings in dev cpp.
>
>
>
> On Sun, Jul 31, 2011 at 1:43 AM, Amol Sharma <amolsharm...@gmail.com>wrote:
>
>> yup it is undefined and the warning is justified
>> b=b++ will assign 2 to b then increment b hence 3 is printed
>>
>> --
>>
>>
>> Amol Sharma
>> Third Year Student
>> Computer Science and Engineering
>> MNNIT Allahabad
>>
>>
>>
>>
>> On Sun, Jul 31, 2011 at 1:41 AM, Neeraj Gupta 
>> <neeraj.gupta...@gmail.com>wrote:
>>
>>> Yes, it's UB.
>>> For such ques, try to run it on ideone.
>>> It will give a warning if any operation is not standard.
>>> http://ideone.com/bJBGl
>>>
>>>  <http://ideone.com/bJBGl>
>>>
>>> On Sun, Jul 31, 2011 at 1:38 AM, aditi garg 
>>> <aditi.garg.6...@gmail.com>wrote:
>>>
>>>> it would be undefined...
>>>>
>>>> On Sun, Jul 31, 2011 at 1:34 AM, Kamakshii Aggarwal <
>>>> kamakshi...@gmail.com> wrote:
>>>>
>>>>> 3.it is same as b=b+1;
>>>>>
>>>>>
>>>>> On Sun, Jul 31, 2011 at 1:32 AM, aseem garg <ase.as...@gmail.com>wrote:
>>>>>
>>>>>> int b=2;b=b++;
>>>>>> b=???
>>>>>>
>>>>>> Plz explain..
>>>>>> Aseem
>>>>>>
>>>>>>  --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Algorithm Geeks" group.
>>>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>>>> To unsubscribe from this group, send email to
>>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Kamakshi
>>>>> kamakshi...@gmail.com
>>>>>
>>>>>  --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Algorithm Geeks" group.
>>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>>> To unsubscribe from this group, send email to
>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Aditi Garg
>>>> Undergraduate Student
>>>> Electronics & Communication Divison
>>>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
>>>> Sector 3, Dwarka
>>>> New Delhi
>>>>
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Algorithm Geeks" group.
>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> algogeeks+unsubscr...@googlegroups.com.
>>>> 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 algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> 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 algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Sanchit Manchanda
> COE(3rd year) , NSIT
> http://iblogmythots.wordpress.com/
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards,
Kamakshi
kamakshi...@gmail.com

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

Reply via email to