including shell env variables into C code

Hey, I'm brushing up on C code and I'm trying to incorporate the shell environmental variables into standard ansi C code.

For example I just want to do the equivalent of
--echo $PATH-- and implement that in standard ansi C code.

How would I do that?

Thanks

Here it is..:

/* ShellCommsInC.c: sample program to see how shell commands can be incorporated
   in standard C ANSI code
*/

# include <stdio.h>

int main ( void )
{
     printf("\n* * * * * * * * * * * * * * * *\n") ;
     printf("This is a test for incorporating shell comm's into ANSI C code\n") ;

     system("echo") ;
     system("echo '$PATH' is: $PATH") ;
     system("echo") ;
     system("echo '$HOME' is: $HOME") ;
     system("echo") ;
     system("echo '$USER' is: $USER") ;

     printf("\nAnd so on..\n") ;
     printf("\n* * * * * * * * * * * * * * * *\n") ;

return 0 ;
}

I would just do:
puts(getenv("PATH"));

All of the env variables:

#include <stdio.h>
int main(int argc, char **argv, char **envp)
{
	while(*envp)
	{
		printf("%s\n",*envp++);
	}
	return 0;
}

Thanks guys! This site is great!