text: Storing the index
code: indices [ ind ] = i ; ind ++ ; } if ( k < elements [ 0 ] ) { printf ( " Not ▁ found " ) ; exit ( 0 ) ; } else { for ( i = 1 ; i <= ind ; i ++ ) if ( k <= elements [ i ] ) { start = indices [ i - 1 ] ; end = indices [ i ] ; set = 1 ; break ; } } if ( set == 0 ) { start = indices [ i - 1 ] ; end = n ; } for ( i = start ; i <= end ; i ++ ) { if ( k == arr [ i ] ) { j = 1 ; break ; } } if ( j == 1 ) printf ( " Found ▁ at ▁ index ▁ % d " , i ) ; else printf ( " Not ▁ found " ) ; }