06-07-2007 08:15 PM
06-08-2007 01:42 AM
Well, according to K&R the correct attribute to use is precision, not minimum field width. That is:
sprintf (dest, "%.4s", cValueArray ); (Please note the dot )
copies exactly 4 bytes to destination string adding a nul terminator at the end.
06-08-2007 01:38 PM