newpgm - printf ("\t%2d: '%s'\n", n, argv[n]); p...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <stdio.h> extern char ** environ; e int main(int argc, char *argv[]) /* program to be exec(2)'d */ { char **p; int n; i printf ("My input parameters (argv) are:\n"); for (n = 0; n < argc; n++)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: printf ("\t%2d: '%s'\n", n, argv[n]); p printf ("\nMy environment variables are:\n"); for (p = environ; *p != (char *) 0; p++) printf ("\t%s\n", *p); p return 0; }...
View Full Document

This note was uploaded on 04/11/2010 for the course CECS 326 taught by Professor Staff during the Spring '08 term at CSU Long Beach.

Ask a homework question - tutors are online