//Declaration: int ispunct(int ch);
//Return: returns nonzero if ch is a punctuation character;
otherwise zero is returned.
#include
#include
int main(void)
{
char ch;
for(;;) {
ch = getchar();
if(ispunct(ch)){
printf("%c is punctuation\n", ch);
}
if(ch == '.'){
break;
}
}
return 0;
}
/*
f
g
x
h
a
.
. is punctuation
*/