I have been thinking a little about environment variables and have a few questions/observations.
putenv(char *string);
This call seems
Furthermore (though I haven't tested it), since one use of environment variables is to pass values to child's environment this seems useless if the child calls one of the exec() functions. Am I wrong in that?
That's not how the environment is passed to the child. All of the various flavors of exec() (which you find in section 3 of the manual beause they are library functions) ultimately invoke the system call execve() (which you find in section 2 of the manual). The arguments are:
int execve(const char *filename, char *const argv[], char *const envp[]);
The vector of environment variables is passed explicitly (and may be partly constructed from the results of your putenv() and setenv() calls). The kernel copies these into the address space of the new process. Historically there was a limit to the size of your environment derived from the space available for this copy (similar to the argument limit) but I'm not familiar with the restrictions on a modern Linux kernel.