@Vishal : Ya this seems to be correct..
On Wed, Jun 22, 2011 at 7:05 AM, ankit sambyal <ankitsamb...@gmail.com> wrote: > @Balaji : the code given by u compiles and runs successfully in gcc > compiler and gives the correct answer i.e. INDIAhyd . What's the > problem ?? > @Shachindra A C : Which memory leak are you talking about ?? The > memory allocated from the heap using malloc need not be released > before termination of the program. That's definitely not an error. The > compiler does it automatically after the termination of the program... > > Correct me if I am wrong !! > > Regards, > Ankit Sambyal > BITS Pilani > > On Wed, Jun 22, 2011 at 6:34 AM, Shachindra A C <sachindr...@gmail.com> wrote: >> @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 <pritpal2...@gmail.com> >> 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 <balaji.ceg...@gmail.com> 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 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 >>> Pritpal Singh Banga >>> (RIT2008021) >>> BTech ( IT ) , 6th Semester, >>> Indian Institute of Information Technology >>> Allahabad - 211012, India >>> Official email : rit2008...@iiita.ac.in >>> 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 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, >> 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 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.