참조: ispunct() 특수문자(punctuation) 인지 알려준다. > C/C++ TIP

본문 바로가기
사이트 내 전체검색

C/C++ TIP

참조: ispunct() 특수문자(punctuation) 인지 알려준다.

페이지 정보

profile_image
작성자 이즈
댓글 0건 조회 1,058회 작성일 10-09-10 15:35

본문

ispunct


설명 특수문자(punctuation) 인지 알려준다.
문법

#include<ctype.h>

int ispunct(int c);

기능

c 가 특수 문자인자 알려준다.

리턴값

참이면 0 이외의 값을 리턴한다, 거짓일경우 0 를 리턴한다.

 

사용법

 

#include<stdio.h>

#include<ctype.h>

int main( ) {

char ch1= 'A';

char ch2= 97;

char ch3= '#';

printf("%d\n", ispunct(ch1));

printf("%d\n", ispunct(ch2));

printf("%d\n", ispunct(ch3));

if( ispunct(ch3)) {

printf("특수 문자입니다.\n");

}

else

{

printf("특수문자가 아닙니다.\n");

}

return 0;

}

 

0

0

16

특수 문자입니다.


댓글목록

등록된 댓글이 없습니다.

Total 261건 1 페이지

검색

회원로그인

회원가입

사이트 정보

컴퓨터 정보,윈도우즈,리눅스,포토샵,3ds
맥스,프로그래밍 강좌팁

접속자집계

오늘
294
어제
569
최대
5,287
전체
636,569
Copyright © www.qdata.co.kr All rights reserved.