hello,
When we pass int pointer or char to a function, we do something like this:
main()
{
pass(&i,&c);
}
void pass(int *i, char *c)
{
.........................
}
Question:
How do I pass a file pointer that is opened in the main function to another function as an argument? After passing the file pointer to the function, do I need to close the file i.e fclose(fp) at the end of that function, eventhough, there is fclose(fp) in the main function?
Please help!