how to share global variable in different c script?

Thank you for your clarification and giving the solution with the “static” prefix. This works now as expected.