default  arguments are added right to left  , in first one it is left to
right thats why error

On Sat, Aug 6, 2011 at 9:41 AM, siddharth srivastava <akssps...@gmail.com>wrote:

> Hi
>
>  On 6 August 2011 12:08, swetha rahul <swetharahu...@gmail.com> wrote:
>
>> Hi,
>>
>> Q.No:1
>>  what is wrong here
>> void foo(int x=10,int y)
>> how compiler will treat it??
>
>
> compiler error
> to get it working y should also have a default value.
>
>
>>
>> and what happen here
>> void foo(int x=10,int y=20)
>>
>>
> will work fine
>
>
>> Q.No:2
>> How to remove duplicate elements from an array in just one pass.. Take
>> care of time and space complexity..
>>
>>
>> --
>> 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
> Siddharth Srivastava
>
>
>
> --
> 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.

Reply via email to