C ispunct function

« Previous

Synopsis:

Example

#include <stdio.h>
int ispunct(int c); 

Description:

The function returns nonzero if c is any of:

Example

! " # % &  ' ( ) ; < = >> ? 
[ \ ] * + , - . / : ^ _ { | } ~

Return Value

The function returns nonzero if c is punctuation otherwise this will return zero which will be equivalent to false.

Example

Example

#include <stdio.h>
int main() {
  if( ispunct( '%' ) )
  {
     printf( "Character  % is a punctuation\n" );
  }
  if( ispunct( 'A' ) )
  {
     printf( "Character  A is a punctuation\n" );
  }
  return 0;
}

Output Will Be :

Output

Character  % is a punctuation


« Previous
Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!