You're getting a segmentation fault because you are trying to write 3 characters into a 2 character array. (NUL is a character too)
Hasturkun
2010-09-12 15:53:30
You're getting a segmentation fault because you are trying to write 3 characters into a 2 character array. (NUL is a character too)
sprintf is putting in a null character to terminate the string. So you need a three-character array to hold a two-character string; it's really 'a' 'b' '\0'.