I successfully completed following topics,
1.Successfully extracted current environment variable using getenv.
2.Changed current env var using putenv.
3.Extracted all env var using Environ.
4.successfully used syslog,openlog,closelog,setlogmask.
5.working on redirection of portion of output to file.
i am using /dev/tty to redirect part of output to file but it prints all the stdout statements to file….