In the C language, how do I convert unsigned long value to a string (char *) and keep my source code portable or just recompile it to work
For a long value you need to add the length info 'l' and 'u' for unsigned decimal integer,
as a reference of available options see sprintf
#include int main () { unsigned long lval = 123; char buffer [50]; sprintf (buffer, "%lu" , lval ); }