Depends on the os. For windows you can do Beep() or '\a' on any os I think but that isn't a custom freq. I forgot what the function was on linux haven't used that in a while.
I suppose you could put a long amount of time for the time. Or maybe use a loop that goes for ever.
1 2 3 4
while( true )
{
Beep( hz , 1000 );
}
Also after looking at the Beep function again it seems that the max hz is 32767 so might have to use something else for 48kHz.
Maybe get a mp3 or wav that is 48khz beep and then keep playing that via a loop.