-
int to string in C
Say u have int i=90 and char str[2], where str[] is an array of chars ( aka string), would u recommend using memset or memccpy (from string.h>) to make a string from an integer.
In my program, int can be any random number ( not a particular range of numbers) so u cant necessarily create a lookup table and use strcpy().
please get back asap cos its due this Friday.
cheers
-
I would use itoa(...) to convert an integer to a string in C:
http://www.mkssoftware.com/docs/man3/itoa.3.asp
ac
-
I would learn how to use google and how to do proper research so I could do my own homework.