#include <string.h>
void testok(void) reentrant { char buff[20];
buff[0]=1;
strcpy(buff,"hello");
//ok: buff = "hello"
}
void testfail(void) reentrant { char buff[20];
buff[0]=1; buff[2]=2;
//fail: buff = "ello"
void main(void) { testok(); testfail(); }
Don't worry about strcpy() right now.
Instead consider how you intended your two functions to actually perform some action that means something to the main loop or to the state of peripherials or GPIO based on the result you got.