structure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dasarisrikar
    New Member
    • Sep 2006
    • 18

    structure

    Hi,
    I got selected in one written exam for a software job my next round is on c programming...t hey will ask to write c programs.....th ey 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.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Originally posted by dasarisrikar
    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?

    Comment

    • dasarisrikar
      New Member
      • Sep 2006
      • 18

      #3
      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.

      Comment

      • dasarisrikar
        New Member
        • Sep 2006
        • 18

        #4
        waiting for u r reply banfa.......... ...

        Comment

        Working...