Ok I'm writing a program and had a question. I've attached the declare.h, main.c, and printdata.c files i've created. My question is this...I'm trying to create a log file to record errors and success's to record stages the program goes through. Successful openings, etc. like setup.logs that come with anything. In my declare.h I've made two global variables int rc and char filename[100]...In main I've said rc=create_log_file(filename);

First question: Does the statement rc=create_log_file(filename); send the array to the function create_log_file and if so why do I have to receive the filename as int create_log_file(char* filename)...Why do I have to do pointer. Is it because since it is in a different c file you have to use pointer in the printdata in order to see filename?? I'm going to use filename to store just that the directory ie: C:\\Hern\\HR on where to store log file and create. Help me if I am understanding this wrong. Maybe I do not understnad that when yuou pass array you must accept as pointer. Help please

declare.h
Code:
#ifndef DECLARE_H
#define DECLARE_H


//Function prototypes
void print_menu();

//Global Variables
char filename[100];
int rc;
#endif;
main.c
Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

#include "declare.h"
#include "employee_data.h"

int main()
{
	
	int choice; //local variable
	
	rc=create_log_file(filename);
                return 0;
}
printdata.c
Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

#include "declare.h"
#include "employee_data.h"

extern int rc;
extern char filename[100];

/****************************************
 create_log_file() - create new log file
 Return: 0 - Success
         1 - Error
 ****************************************/
int create_log_file(char* filename)
{
}