I am unable to detect the memory error(memcheck error) . when i run the code i see some unexpected output came. so please describe what is happening in thes code.
#include <stdio.h>
#include <stdlib.h>
char *getString()
{
char message[100]="Hello World";
char *ret = message;
return ret;
}
void test4()
{
printf("String: %s",getString());
}
int main()
{
test4();
return 0;
}