From: Vic Newsgroups: comp.os.msdos.djgpp Subject: Re: A DOUBT LOOK THIS Date: Thu, 30 Jul 1998 09:31:19 -0400 Organization: Communications Accessibles Montreal, Quebec Canada Lines: 17 Message-ID: <35C075A7.5CCA@cam.org> References: <35BFFED0 DOT 459E AT hotmail DOT com> <35C0098B DOT 6835A285 AT mailexcite DOT com> NNTP-Posting-Host: dialup-678.hip.cam.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Doug Gale wrote: > if (strcmp(argv[1], "the") == 0) > printf("OK"); > else > printf("Wrong"); shouldn't this be if (!strcmp(argv[1], "the") == 0) ^^^ printf("OK"); else printf("Wrong"); ? AFAIK strcmp returns 0 if there is a match.