
Implement gm_memset, your own memset, which fills the first n bytes of a memory area with a single byte value, then returns the area's address.
gm_memset(buf, 'A', 5) // then buf[5]='\0'; print bufExpected result
AAAAAFor your own tracking. Tests grade your code.
gm_memset("commit", '0', 3) // first 3 bytes onlyExpected result
000mitExpected files
memset.cAllowed functions
None. Write every helper yourself.
Allowed headers
Standard C library
Implements the contract of a function from the standard C library.

v0.40: Create exercises. Challenge the community.
Meet Studio →Implement gm_memset, your own memset, which fills the first n bytes of a memory area with a single byte value, then returns the area's address.
gm_memset(buf, 'A', 5) // then buf[5]='\0'; print bufExpected result
AAAAAFor your own tracking. Tests grade your code.
gm_memset("commit", '0', 3) // first 3 bytes onlyExpected result
000mitExpected files
memset.cAllowed functions
None. Write every helper yourself.
Allowed headers
Standard C library
Implements the contract of a function from the standard C library.

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.