use xor inplace of a swap...u wont require extra space or memory... printing isnt a solution...
On Mon, Aug 29, 2011 at 6:15 PM, Dheeraj Sharma <dheerajsharma1...@gmail.com > wrote: > void rev_str(int i) > { > if(i==((length/2))) > return ; > rev_str(i+1); > SWAP(str[i],str[length-1-i],t); > } > > passing 0 as parameter... > > > On Mon, Aug 29, 2011 at 5:43 PM, mani walia <manis...@gmail.com> wrote: > >> aa chak code >> >> >> #include<conio.h> >> >> #include<stdio.h> >> >> void rev(char*); >> >> int main() >> { >> >> >> >> rev("hello sexy how are you"); >> >> getch(); >> } >> void rev(char *t) >> { >> >> if(*t) >> { >> >> rev(t+1); >> } >> printf("%c",*t); >> >> } >> >> >> khush reh... lol >> >> >> On Mon, Aug 29, 2011 at 5:38 PM, saurabh singh <saurab...@gmail.com>wrote: >> >>> http://www.ideone.com/kSaff >>> >>> >>> On Mon, Aug 29, 2011 at 4:17 PM, rohit agarwal < >>> agarwal.rohi...@gmail.com> wrote: >>> >>>> Print the last character of a string and call the function recursively >>>> with remaining string (of length (n-1)) >>>> >>>> >>>> -- >>>> * Thanks and Regards* >>>> ┌─────────────────────────┐ >>>> Rohit Agarwal >>>> Final Year >>>> B.Tech (Information Technology) >>>> NIT Durgapur <http://www.nitdgp.ac.in> >>>> └─────────────────────────┘ >>>> >>>> >>>> >>>> >>>> -- >>>> 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. >>>> >>> >>> >>> >>> -- >>> Saurabh Singh >>> B.Tech (Computer Science) >>> MNNIT ALLAHABAD >>> >>> >>> >>> -- >>> 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. >> > > > > -- > *Dheeraj Sharma* > Comp Engg. > NIT Kurukshetra > +91 8950264227 > > > -- > 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.