 <p>The header file (<code>.h</code>) is the programmer's interface to your module. Anything a user (programmer) of your module needs to know to use your module should be in there, but put the actual implementations in the associated <code>.c</code> file. Generally, you put the function prototypes (e.g. <code>int f(void);</code>) in the <code>.h</code> file and the definitions (the implementations, e.g. <code>int f(void) { return 1; }</code>) in the <code>.c</code> file. The linker matches the prototype to the definition because the function signatures match (the name, argument types, and return type). One way to think about it is the <code>.h</code> file as what you share with everyone, and the <code>.c</code> file as what you keep to yourself.</p> <p>If you want a user of your module to have access to <code>STUDENT_SIZE</code>, then put</p> <pre><code>#define STUDENT_SIZE 20 </code></pre> <p>in your <code>.h</code> file instead of your <code>.c</code> file. Then, any file with</p> <pre><code>#include "stud.h" </code></pre> <p>would have your macro for <code>STUDENT_SIZE</code>. (Notice the file name is <code>"stud.h"</code> not <code>"stud"</code>.)</p> <blockquote> <p>Lets say i want to use STUDENT_SIZE in another file whats the syntax? Do i need to use stud.STUDENT_SIZE?</p> </blockquote> <p>No. You might be confusing this with namespaces, which <a href="http://stackoverflow.com/questions/4396140/why-doesnt-ansi-c-have-namespaces">C does not have</a> in the same sense as other languages like C++, Java, etc. Just use <code>STUDENT_SIZE</code>. (This is why it is important to not use existing identifiers, and also why many people frown upon macros.)</p> <blockquote> <p>... i want from another file to access some of the functions inside stud.c.</p> </blockquote> <p>If you want another file to have access to some function in <code>stud.c</code>, then put that function's prototype in <code>stud.h</code>. This is precisely what the header file is for.</p> <blockquote> <p>... if i want to lets say make an array of students:</p> <p><code>struct stud students[STUDENT_SIZE];</code></p> <p>Can i access that normally like <code>students[5].stud_id</code> ?</p> </blockquote> <p>As you have written your header file, no. You might know some <code>struct stud</code> exists, but you don't know what the members are called (i.e. you wouldn't know <code>stud_id</code> exists). The reason is that the user of your module sees only what is in the header file, and you defined no members of the struct in your header file. (I'm surprised what you have written even compiles, because you define <code>struct stud</code> twice, once empty <code>{}</code>, and once with members.) Again, if you want the programmer user to have access to the members of <code>struct stud</code>, its definition</p> <pre><code>struct stud { char stud_id[MAX_STR_LEN]; char stud_name[MAX_STR_LEN]; struct grade Grade[MAX_STRUCT]; struct income Income[MAX_STRUCT]; }; </code></pre> <p>belongs in your header file (along with whatever those other macros are). Without knowing this, the programmer (and the compiler) has no idea what the members of <code>struct stud</code> are.</p> <p>(You didn't ask about this, but if you want to share access to a <em>global variable</em> in your <code>.c</code> file, then <em>declare</em> it with the keyword <code>extern</code> in your <code>.h</code> file, and without <code>extern</code> in your <code>.c</code> file. See <a href="http://stackoverflow.com/questions/496448/how-to-correctly-use-the-extern-keyword-in-c">How to correctly use the extern keyword in C</a> for more.)</p>