
Implement gm_strncpy, your own strncpy, which copies at most n bytes from src into dst, padding the rest of dst with \0 when src is shorter than n, and writing no terminator at all when src is n bytes or longer.
gm_strncpy(dst, "git", 8) // dst pre-filled with 10 '#', dump 10 bytesgit.....##gm_strncpy(dst, "rebase", 6) // src length == n: copied, no terminatorrebase####gm_strncpy(dst, "docker", 4) // src longer than n: truncated, no terminatordock######strncpy.c<stddef.h>defines size_tStandard C library
Implements the contract of a function from the standard C library.

Run the tests to grade your code
Implement gm_strncpy, your own strncpy, which copies at most n bytes from src into dst, padding the rest of dst with \0 when src is shorter than n, and writing no terminator at all when src is n bytes or longer.
gm_strncpy(dst, "git", 8) // dst pre-filled with 10 '#', dump 10 bytesgit.....##gm_strncpy(dst, "rebase", 6) // src length == n: copied, no terminatorrebase####gm_strncpy(dst, "docker", 4) // src longer than n: truncated, no terminatordock######strncpy.c<stddef.h>defines size_tStandard C library
Implements the contract of a function from the standard C library.

Run the tests to grade your code
Memory will appear here