By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,413 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,413 IT Pros & Developers. It's quick & easy.

structure

P: 18
Hi,
I got selected in one written exam for a software job my next round is on c programming...they will ask to write c programs.....they sent a sample question for me...its like

An Array named 'DATE_ARRAY' with 'n' elements is present in the
memory. Each element in the array is a structure representing the
'Date' information and its type definition is shown below:
Type def struct Date_st
{
int MM;
int DD;
int YYYY;
} Date;
Assume that the elements in DATE_ARRAY are sorted in ascending order
(for example date1 (03, 21, 1975) < date2 (03, 22, 1975)). Write a
'C' program that takes a date as its command-line argument (in the
form of a numeric string "MMDDYY") and uses the Binary search
algorithm to determine whether the input date exists DATE_ARRAY or not.


could u please write a c program for this.......and wher can i get programmes like this for preparation.....

Thanks & Regards.
Nov 3 '06 #1
Share this Question
Share on Google+
3 Replies


Banfa
Expert Mod 5K+
P: 8,916
could u please write a c program for this.......and wher can i get programmes like this for preparation.....
Yes I could but that wont help you because this is a sample question, in the interview/test they will most likely be asking you a different but similar question so you need to understand how to solve a problem like this.

Me solving it for you will not help.

Do you know how a binary search algorithm works?
Nov 3 '06 #2

P: 18
yes banfa u r right ....but i hav no time i hav interview on day after tomorrow....so kindly help me.......
pls provide me the answer........
Thanks & Regards.
Nov 3 '06 #3

P: 18
waiting for u r reply banfa.............
Nov 5 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.