Hi,
i have two files. 1.c and 2.h like below
2.h file
Code:
int fun()
{
printf ("hai how are you\n");
return 0;
}
1.c file
Code:
#include<stdio.h>
#include"2.h"
int i;
int j;
int main()
{
int fun();
printf ("%d\n",i);
fun();
printf ("%d\n",i);
}
if run the above program by using #cc 1.c , i should get the output as
"0
hai how are you
0".
if i rename the 2.h to 2.c and reflect the same change in include file on 1.c , then also i get the same output.
actualy what is the correct procedure?
in which condition i include .h file and in which condition i need to include .c file?
i would appreciate any help.