> Simon, > > The "outcome" of the '=' operation is to place the contents of the > expression on the right side of the '=' into the location given by resolving > the expression on the left side. No other processing or testing is > performed; it is simply an assignment statement. However, in this example > the "result" of the assigment is compared to '\0'; since after the > assignment *s = *t both the locations pointed to by the pointers s and t > have the same data in them, it matters not which one gets used for the > comparison test against '\0'. > > No, in this example, the character that's being copied (from the location > pointed by t to the location pointed to by s) is being tested to for that > character is the C string termination char '\0'. If it is, it signals the > end of the string (char by char) copy operation. > > Douglas Wood > Software Engineer Actually, this is not correct either. In the expression: (x = y) != '\0'; The comparison is to the value of the sub-expression (x = y). This is defined to be the value of the left hand argument, not the right hand one. To see where this can make a difference: char x; int y = 256; (x = y) != 0 Since 'x' will be zero (when char is 8 bits), you will get a surprising result. Bob Ammerman RAm Systems -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.