All pastes #373104 Raw Edit

Anonymous

public text v1 · immutable
#373104 ·published 2007-02-26 15:45 UTC
rendered paste body

1.Write a C, C++ or C# function to provide the following functionality ultoa, without using library functions.  The function

void ultoa( unsigned long l, char* pStr, int base)

should convert unsigned long l to an ascii string of base ‘base’ and place in the buffer pointed to by pStr.  You may assume that pStr has enough space to hold the string and that base will be in the range 0<=base<=16.