@balaji, the memory allocated from the heap using malloc needs to be
released before termination of the program. there should be two additional
statements as follows:

free(p);
free(q);


On Wed, Jun 22, 2011 at 6:09 PM, PRITPAL SINGH <[email protected]>wrote:

> @balaji
>
> I think memory leak is the only problem with the code.
> rest is fine
>
>
> On Wed, Jun 22, 2011 at 6:03 PM, Balaji S <[email protected]> wrote:
>
>> @pritpal : Refer ques 5 at
>> http://www.youthrocker.com/2011/06/interview-questions-amazon-placement.html
>>
>> @shachindra : wats tat :-o
>>
>> --
>> 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.
>>
>
>
>
> --
> Regards
> Pritpal Singh Banga
> (RIT2008021)
> BTech ( IT ) , 6th Semester,
> Indian Institute of Information Technology
> Allahabad - 211012, India
> Official email : [email protected] <[email protected]>
> Mobile: +91-9793907703
>
> --
> 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.
>



-- 
Regards,
Shachindra A C

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