Function question for brain-fried newb
Hello ne-er do wells,
I could use a hand with this assignment I've got. I had it all good to go until the professor requested I try rewriting it using functions. Ok no sweat...what I can't figure out now is how to return a string from this function. I know the answer is on the tip of my nose but I'm starting to go cross-eyed...The function needs to accept the full name (first and last with whitespace) and return the full name to another function.
Code:
void studentName (void)
{
char name[50];
printf ("\n\nPlease enter student's name:");
scanf ( "%[^\n]", name );
printf ("\n\nStudent's name is %s:", name);
}
Thanks in advance!!!!