VOOZH about

URL: https://www.geeksforgeeks.org/c/ispunct-function-c/

⇱ ispunct() function in C - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

ispunct() function in C

Last Updated : 16 Dec, 2021
The ispunct() function checks whether a character is a punctuation character or not. The term "punctuation" as defined by this function includes all printable characters that are neither alphanumeric nor a space. For example '@', '$', etc. This function is defined in ctype.h header file.

syntax:

int ispunct(int ch);
ch: character to be checked.
Return Value : function return nonzero
 if character is a punctuation character;
 otherwise zero is returned. 
Sentence contains 2 punctuation characters.
Output:
All punctuation characters in C programming are: 
! " # $ % & ' ( ) * +, - . / : ; ? @ [ \ ] ^ _ ` { | } ~
Comment
Article Tags:
Article Tags: