I have to return a char * from a routine which has a char[]
This should be simple but sometimes str1 results in garbage
char* foo (int ch) {
char str[10];
char* str1;
if (foo1(str,ch)) {
str1 = str;
} else {
str1 ="???"
}
return(str1);
}
boolean foo1(char *s, int c) {
/*find s based on c*/
}