This won't work, you can't return an array in C. You can fake it by returning a char *, but in this case it still won't work because when the function returns, the memory for fn is freed and the pointer that you pass back will point to garbage. The best way to do this is to have the calling function allocate an array and pass it to your function.
Code:
char *new_book( char fn[] )
{
printf( "What do you want your new address book to be called: " );
scanf( "%s", &fn );
strcat( fn, ".dg" );
return fn;
}
If you can't do that then you have to allocate the memory yourself and free it in the calling function.
Code:
char *new_book()
{
char *fn = malloc( 104 );
if( fn == NULL ) {
fprintf( stderr, "Couldn't allocate memory\n" );
return NULL;
}
printf( "What do you want your new address book to be called: " );
scanf( "%s", &fn );
strcat( fn, ".dg" );
return fn;
}