Hi,
I am going to write an exam I found a model question.
could u pls solve this question.
An array named 'DATE_ARRAY' with n elements present in the memory.
Each element in the array is a structure representing the 'Date' information and its type defination is shown below.
Type def struct DATE_st
{
int MM;
int DD;
int YYYY;
}Date;
Assume that the elements in the DATE_ARRAY are sorted in the ascending order for example{date1(3,21,1975)<date(3,22,1975)}.
Write a c program that takes a date as its command line arguement(in the form of numeric string "MMDDYYYY")and use the binary search algorithm to determine wether the input date exists DARE_ARRAY are not.
Could u pls write a c progra for this and wt s the theory behind it.
Thanks & Regards.