| Name: _____________________ | Class: CET 421 |
| SSN/ID: _____________________ | Section & Group: ____________ |
/*
environ - skeleton program displaying environment
usage:
environ
displays environment with each name, value pair on a separate line
********************************************************************
version: 1.0
date: December 2003
author: Smart Student
sstudent@school.edu
copyright (c) Smart Student, 2003. All rights reserved.
This code can be used for teaching purposes, but no warranty,
explicit or implicit, is provided.
*******************************************************************/
#include <stdio.h>
#include <stdlib.h>
extern char **environ; // environment array
int main(int argc, char **argv)
{
char ** env = environ;
while (*env) printf("%s\n",*env++); // step through environment
exit(0);
}