Warm-up assignment 1

Write code to implement binary search. Use C or C++. Your program should take as command line argument the size of the desired array. It should create an array of desired size and populate it with numbers in increasing order. Then it should enter a loop where it asks the user whether to continue (y/n), and if the user says 'y', should ask for the target value to search. Then it should print the answer.
% binsearch 10 
array is [1,2,3,4,5,6,7,8,9,10]

enter target: 2
target 2 occurs at index 1
more? (y/n): y

enter target: 20
target 20 not found 
more? (y/n): n

bye. 
Things to figure out: