Recursive function to generate all binary strings formed by replacing each wildcard character by 0 or 1
void print ( string str , int index ) { if ( index == str . size ( ) ) { cout << str << endl ; return ; } if ( str [ index ] == ' ? ' ) {