int check_reg(const char *path) {
	struct stat sb;
	return stat(path, &sb) == 0 && S_ISREG(sb.st_mode);
}


int check_dir(const char *path) {
	struct stat sb;
	return stat(path, &sb) == 0 && S_ISDIR(sb.st_mode);
}

int main() {
	printf(,
	    check_reg() ?  : );
	printf(,
	    check_dir() ?  : );
	printf(,
	    check_reg() ?  : );
	printf(,
	    check_dir() ?  : );
	return 0;
}