This topic contains 0 replies, has 0 voices, and was last updated by  EduGorilla 1 year, 11 months ago.

  • Author
    Posts
  • #1440096 Reply
     EduGorilla 
    Keymaster
    Select Question Language :


    Consider the following code which is implemented on a linked list :
    Struct node *ABC(Struct node *S)
    {
    Struct node *p,*q;
    p = q = S;
    while(q!=null && q->next !=null && q->next->next !=null)
    {
    p = p->next;
    q = q->next->next;
    }
    return p;
    }
    What does the code return when the head of a linked list is passed as an argument to the code ?

    Options :-

    1. Returns the third element from last
    2. Returns the second element from last
    3. Returns the middle element of linked list
    4. Returns the last element of linked list
    Post your Training /Course Enquiry
    Are You looking institutes / coaching center for
    • IIT-JEE, NEET, CAT
    • Bank PO, SSC, Railways
    • Study Abroad
    Select your Training / Study category
Reply To: Consider the following code which is implemented on a linked list : Struct node *ABC(Struct node *S….
Your information:




Verify Yourself




Log in with your credentials

or    

Forgot your details?

Create Account