From ed10783845b5ce70b223ada4c9d32cebbb53450a Mon Sep 17 00:00:00 2001 From: Maalvika Bhat <42943695+maalvikabhat@users.noreply.github.com> Date: Mon, 13 Apr 2020 20:11:34 -0400 Subject: [PATCH] Fixing --- exercises/ex09/newshound.c | 50 +++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/exercises/ex09/newshound.c b/exercises/ex09/newshound.c index 476d8741..28c877e7 100644 --- a/exercises/ex09/newshound.c +++ b/exercises/ex09/newshound.c @@ -1,7 +1,5 @@ /* Example from Head First C. - Downloaded from https://github.com/twcamper/head-first-c - Modified by Allen Downey. */ @@ -22,6 +20,10 @@ void error(char *msg) int main(int argc, char *argv[]) { + int status; + pid_t pid; + int i; + if (argc < 2) { fprintf(stderr, "Usage: %s \n", argv[0]); return 1; @@ -39,14 +41,44 @@ int main(int argc, char *argv[]) char *search_phrase = argv[1]; char var[255]; - for (int i=0; i