Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

isalnum - Buchstabe oder Ziffer?

&pagelevel(4)&pagelevel

Definition

#include <ctype.h>

int isalnum(int c);

isalnum überprüft, ob das Zeichen c alphanumerisch ist, d.h. ein Buchstabe (A-Z, a-z) oder eine Ziffer (0-9).

Returnwert 

!= 0

alphanumerisch.

 

0

nicht alphanumerisch.

Hinweise

isalnum ist sowohl als Makro als auch als Funktion realisiert (siehe Abschnitt "Funktionen und Makros“).

Beispiel

#include <ctype.h>
#include <stdio.h>
int main(void)
{
  int c;
  while((c = getchar()) != EOF)
    printf("%s : %c\n", ((isalnum(c)) ? "alphanumerisch" : "Sonstiges"), c);
  return 0;
} 

Siehe auch

isalpha, isascii, iscntrl, isdigit, isgraph, islower, ispunct, isprint, isspace, isupper, isxdigit, isebcdic, iswalnum