Q
questions?
char * get_month(double number){
char month[10];
blah blah
return month
};
int main(){
printf("I want to print %s\n",get_month(whatever);
}
Will this be illegal, since the pointer is pointing to the local
variable month which will be released soon?
What's the nice way of returning a string?
Thanks
char month[10];
blah blah
return month
};
int main(){
printf("I want to print %s\n",get_month(whatever);
}
Will this be illegal, since the pointer is pointing to the local
variable month which will be released soon?
What's the nice way of returning a string?
Thanks