Driver code
int main ( ) { printf ( " Contains STRNEWLINE " ) ; for ( int i = 0 ; i < 10 ; i ++ ) printf ( " % d ▁ % d STRNEWLINE " , i , contains ( 0 , n - 1 , i ) ) ; printf ( " First ▁ occurrence ▁ of ▁ key STRNEWLINE " ) ; for ( int i = 0 ; i < 10 ; i ++ ) printf ( " % d ▁ % d STRNEWLINE " , i , first ( 0 , n - 1 , i ) ) ; printf ( " Last ▁ occurrence ▁ of ▁ key STRNEWLINE " ) ; for ( int i = 0 ; i < 10 ; i ++ ) printf ( " % d ▁ % d STRNEWLINE " , i , last ( 0 , n - 1 , i ) ) ; printf ( " Least ▁ integer ▁ greater ▁ than ▁ key STRNEWLINE " ) ; for ( int i = 0 ; i < 10 ; i ++ ) printf ( " % d ▁ % d STRNEWLINE " , i , leastgreater ( 0 , n - 1 , i ) ) ; printf ( " Greatest ▁ integer ▁ lesser ▁ than ▁ key STRNEWLINE " ) ; for ( int i = 0 ; i < 10 ; i ++ ) printf ( " % d ▁ % d STRNEWLINE " , i , greatestlesser ( 0 , n - 1 , i ) ) ; return 0 ; }