I am wondering how program is showing correct output without external storage external class in source files because I have two source file
main.c
FileA.cCode:#include <stdio.h> void fun (); int main () { int x = 1; fun (x); return 0; }
output : 2Code:#include <stdio.h> void fun ( int y) { y++; printf ("x = %d \n", y); }
variable x is declared in main.c source file and this variable is being passed to function fun which is in source file FileA.c