Compilation command: gcc T1.c -o T1

Final Output with ./T1 :

Search for target 5
could not find target
Search for target 1
target has been found 1000