You are the 17th bzillionth person to try that, and it will always fail. The environment of a process is private to that process. Any child processes will inherit a copy
of the environment, but even this doesn't help you in your unconventional/backward scenario. If you could do what you are trying to do, where would the limit be drawn for what process would be affected by changing the environment? Ultimately, in the Linux process model, all process are children of the init
process, so imagine the far reaching effects you could have.
Your plan of having a C program create environment variables is highly unconventional. Normally, a shell is used to set up the environment, and a binary object module (your compiled C code) would inherit those environment variables. Probably your best bet would be to simply emit a string that can be `backticked` by the shell, which sets the required environment variables. Example:
# Your program is called LQmateo14, and it prints to stdout: