From: Tridib Bandopadhyay Date: 2010-12-07T12:48:39+09:00 Subject: Re: Manual Memory Management and Automatic Garbage Collection Ammar Ali wrote in post #966734: > On Tue, Dec 7, 2010 at 4:27 AM, Tridib Bandopadhyay > wrote: >> >> I tried in there also.Here is the code.-- >> >> >> rb_gc_start() >> { >>    rb_gc(); >>    return Qnil; >>    printf("Hello!!") >> } > > It will never work. You're printing after return! > > Regards, > Ammar I shifted the printf statement above the return statement.Here is the output I am getting-- ./ruby doug.rb Please enter number 1 : 3 Please enter number 2 : 4 Answer : 7 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899-bash-3.00$ Regards Tridib -- Posted via http://www.ruby-forum.com/.