humptydumpty,

Your code is wrong.
In 'Check' function, you assign to a local pointer and not to the array itself.
you should use strcpy to the array (if we are dealing with C as the
sample code the the thread's author provided)