What does lower_bound() method returns if the element is not present?

How is the output to the program is 1 ?

#include
#include
using namespace std;
int main()
{
int arr[5] = { 4, 5, 1, 0, 1 };
sort( arr, arr+5 );
cout<< lower_bound( arr, arr+5, 3 ) - arr <<endl;
return 0;
}

hello @gandikotasasia1_d6d586dbd5c4388c

a) lower bound or upper bound boths works only on sorted array

b) in case of lower bound if element is not present then it gives iterator of next greater element.
ex
1 2 4 5
lower bounf of 3 will return iterator for 4