On Oct 15, 9:03 am, ankur aggarwal <ankur.mast....@gmail.com> wrote:
> 1. Given only putchar (no sprintf, itoa, etc.) write a routine putlong
> that prints out an unsigned long in decimal.
Well,this is rather very easy :
void putlong(unsigned long long num)
{
if(num > 9)
putlong(num/10);
putchar(num%10 + 48 );
}
Regards,
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---