#include <stdio.h>
#include <wctype.h>
int main ()
{
    int i;
    wchar_t str[] = L"c3p。o...";
    i=0;
    while (iswalnum(str[i])){
        i++;
    }
    printf("The first %d characters are alphanumeric.\n",i);
    return 0;
}

输出

The first 3 characters are alphanumeric.

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-12-01
  • 2022-12-23
  • 2021-10-02
猜你喜欢
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2021-11-18
相关资源
相似解决方案