[Courses] re: [C] lesson 7
kibitz
eugene.teo at eugeneteo.net
Wed Nov 6 08:26:34 EST 2002
(see below)
alternatively, you can try writing your own. in fact, you should!
then you know how these functions come about. man -s ascii
u> The C Standard library does have the following predefined functions
u> in the <ctype.h> header:
u>
u> Function | Description
u> ---------+------------------------------------
u> isalnum | Test for Alphanumeric
u> isalpha | Test for Alphabetic
u> iscntrl | Test for Control Character
u> isdigit | Test for Digit
u> isgraph | Test for Graphical Character
u> islower | Test for Lower-Case Letter
u> isprint | Test for Printing Character
u> ispunct | Test for Punctuation Character
u> isspace | Test for White-Space Character
u> isupper | Test for Upper-Case Letter
u> isxdigit | Test for Hex Digit
u> ---------+-------------------------------------
u>
u> Happy Programming!
u> --
u> K
u>
u> On Sun, Nov 03, 2002 at 04:29:39PM -0500, Morgon Kanter wrote:
u> > Hello,
u> >
u> > After doing the lesson 7 excercises, I thought it would be a good idea to
u> > make a header file of some of the common stuff we'd been doing. So here is
u> > one of the excercises.
u> >
u> > char consonent_or_vowel(char letter) {
u> > char returnchar[10];
u> >
u> > <switch statement snipped for brevity>
u> >
u> > returnchar = "consonent";
u> > break;
u> > default:
u> > returnchar = "vowel";
u> > break;
u> > }
u> > return returnchar;
u> > }
u> >
u> > If I made an error, please let me know.
u> >
u> _______________________________________________
u> Courses mailing list
u> Courses at linuxchix.org
u> http://mailman.linuxchix.org/mailman/listinfo/courses
--
eMail: eugeneteo at eugeneteo.net, eugeneteo at null.cc.uic.edu
gpg pub_key: http://null.cc.uic.edu/~eugeneteo/eugeneteo.asc
main(i){putchar(182623909>>(i-1)*5&31|!!(i<7)<<6)&&main(++i);}
More information about the Courses
mailing list