C/ctype.h/ispunct — различия между версиями
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
|
(нет различий)
|
Версия 17:20, 25 мая 2010
int ispunct(int ch)
<source lang="cpp">
//Declaration: int ispunct(int ch); //Return: returns nonzero if ch is a punctuation character;
otherwise zero is returned. #include <ctype.h> #include <stdio.h> int main(void) { char ch; for(;;) { ch = getchar(); if(ispunct(ch)){ printf("%c is punctuation\n", ch); } if(ch == "."){ break; } } return 0; }
/* fd d w s d . . is punctuation
- /
</source>