char *strcat(), *strcpy(), *fgets();
Mike Khaw
mkhaw at teknowledge-vaxc.ARPA
Fri Jun 24 04:26:21 AEST 1988
>From article <1309 at ark.cs.vu.nl>, by maart at cs.vu.nl (Maarten Litmaath):
> Why do the functions named above return 'char *', instead of 'int', viz. the
> REALLY useful new size of the first argument string, or the number of chars
> moved?
I suppose it's so that you can do
strcpy(foo, strcat(bar, fgets(baz, size, stream)));
(Not that I do such things often).
Mike Khaw
--
internet: mkhaw at teknowledge.arpa
uucp: {uunet|sun|ucbvax|decwrl|uw-beaver}!mkhaw%teknowledge-vaxc.arpa
hardcopy: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303
More information about the Comp.std.c
mailing list