Skip to content
RED SAGSkills
medium10 pts · first answer countsembedded-cstrings

strncpy and the missing terminator

src is "TEMPERATURE" (11 characters). What is wrong with dst afterwards?

char dst[8];
strncpy(dst, src, sizeof dst);
printf("%s", dst);
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions