Driver code
int main ( ) { char str [ ] = " baaabab " ; char pattern [ ] = " * * * * * ba * * * * * ab " ; char pattern [ ] = " ba * * * * * ab " ; char pattern [ ] = " ba * ab " ; char pattern [ ] = " a * ab " ; if ( strmatch ( str , pattern , strlen ( str ) , strlen ( pattern ) ) ) cout << " Yes " << endl ; else cout << " No " << endl ; char pattern2 [ ] = " a * * * * * ab " ; if ( strmatch ( str , pattern2 , strlen ( str ) , strlen ( pattern2 ) ) ) cout << " Yes " << endl ; else cout << " No " << endl ; return 0 ; }