want to write two c programs. I want to use the value of the local variable of 1st c program(.c file) in my 2nd c program(.c file) also. How can I use the local variable of one program as global variables of another program? That means how can I make those local variables global so that I can use it in another file. Note that I have only 2 files both are .c files(suppose file1.c, file2.c). write a simple program for me to make local variable of one file to global variable of another file.
I want to put the variable inside the main function (int main()) in one program and these variables will work as a global variable in another program.