C_C++/C_라이브러리_함수

(C언어) tolower, toupper: 문자를 소문자 또는 대문자로 변환한다

고니자니 2023. 3. 9. 15:21
반응형
#include <ctype.h>
int tolower(int ch);
int toupper(int ch);

tolower 함수는 지정된 문자 ch를 소문자로 변환합니다.

toupper 함수는 지정된 문자 ch를 대문자로 변환합니다.

 

#include <stdio.h>
#include <ctype.h>

int main()
{
	char s[]="";
	int c;
	c = tolower('A');
	printf("%c\n", c);

	c = toupper('b');
	printf("%c\n", c);

	return 0;
}

tolower, toupper: 소문자, 대문자 변환

 

728x90
반응형