ºìÁªLinuxÃÅ»§
Linux°ïÖú

Õâ¶þ¶Î´úÂëÓÐʲôÇø±ð£¿

·¢²¼Ê±¼ä:2008-09-08 20:54:26À´Ô´:ºìÁª×÷Õß:cwqing1973
µÚÒ»¶Î´úÂë²»Äܹý±àÒ룺
#include < ctype.h>

main()

{

char str[]="123c@#FDsP[e?";

int i;

for (i=0;tr[i]!=0;i++ )

if ( isalnum(str[i])) printf("%c is an alphanumeric character\n",str[i]);

}

µÚ¶þ¶Î´úÂëͨ¹ýÁ˱àÒëÁË£º
#include
main()
{
char str[]="123c@#FDsP[e?";
int i;
for (i=0;str[i]!=0;i++)
if(isalpha(str[i])) printf("%c is an alphanumeric character\n",str[i]);
}
Ϊʲô°¡£¬ÆäÖÐÎÒÄÜÕÒµ½µÄ´íÎóÊǵÚÒ»¶Î´úÂëÖÐÑ­»·ÖÐ"tr[i]"ÖÐÉÙÁËÒ»¸ö×Ö·û¡°s"£¬¼´Îª¡°str[i]¡±£¬¶øµÚ¶þ¸ö´íÎóÊÇÔÚµÚÒ»ÐУ¬ÎÒ¿´Á˺þö¼Ã»Óп´Ã÷°×°¡£¡
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 2 ÌõÆÀÂÛ

  1. cwqing1973 ÓÚ 2008-09-09 14:21:34·¢±í:

    ´ÏÃ÷£¬ÊÇÕâÑùµÄ¡£ÎÒÏëºÃ¾Ã£¬µ½×òÍíÉÏ×îºó²ÅÃ÷°×1

  2. jeong ÓÚ 2008-09-08 23:22:00·¢±í:

    µÚÒ»¶ÎµÚÒ»ÐÐ#include < ctype.h>£¬£¼ºócÇ°ÓÐÒ»¿Õ°×[i][i][i][i][i][/i][/i][/i][/i][/i]

    [ ±¾Ìû×îºóÓÉ jeong ÓÚ 2008-9-8 23:24 ±à¼­ ]