Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!samsung!umich!umeecs!huggins From: huggins@zip.eecs.umich.edu (James K. Huggins) Newsgroups: comp.lang.c Subject: Re: if ( x && y ) or if ( x ) then if ( y ) ... Message-ID: <1990Aug17.164730.25750@zip.eecs.umich.edu> Date: 17 Aug 90 16:47:30 GMT References: <5781@uwm.edu> Distribution: usa Organization: University of Michigan EECS Dept., Ann Arbor, MI Lines: 18 In article <5781@uwm.edu> andrew@csd4.csd.uwm.edu (Andy Biewer) writes: | [...] I have been wondering for quite |some time now about what, if any, differences there are between the two |conditional statements: | | 1) if ( x && y ) | statement; | | 2) if ( x ) | if ( y ) | statement; | |It may be a trivial question, however, is there any? Will `y' in the first |conditional be tested if `x' fails? I know that it won't in the second. K&R 2 specify that if 'x' fails (i.e. has value 0), 'y' will not be tested. Jim Huggins, Univ. of Michigan