The freopen function is typically used to associate one of the predefined names stdin, stdout, or stderr with a file.