2022-08-12 01:39 AM
2022-08-12 01:48 AM
Use the proper escape character, ie \n
2022-08-12 02:31 AM
Might also point out that sprintf returns the length of the generated string, and sizeof() isn't suitable for strings.
2022-08-12 10:48 AM
And use snprintf() instead of sprintf(). Friends don't let friends use sprintf().