C language determines whether a character is punctuated or not

w‮ttual.ww‬uri.com
C language determines whether a character is punctuated or not

In C, you can use the ispunct function to check if a character is punctuated.

char ch = '!';
 if(ispunct(ch))
   printf("punctuation");     
 else
     printf("other symbol" );
Created Time:2017-08-28 09:39:31  Author:lautturi