Desc :

 

 


Source Code :

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

void main()
{
	char *string = "(02) 1234 - 5678";
	char buff[20] = { 0, };
	int i = 0;

	while (*string)
	{
		if (isdigit(*string))	//문자열이 숫자면
		{
			buff[i++] = *string;	// 추출
		}
		string++;	// 다음문자
	}
	puts(buff);
}

 


Result :

+ Recent posts