Implement a function that returns the 5th element from the
end in a singly linked list of integers in one pass.

Answers were Sorted based on User's Feedback



Implement a function that returns the 5th element from the end in a singly linked list of integers..

Answer / vrushali

In whatever the case , we require to know the no of nodes in
the LL. As there is no way to know the total no of nodes
without traversing the LL.

Please coorect me if I am wrong.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

What does static variable mean in c?

0 Answers  


In a header file whether functions are declared or defined?

0 Answers   TISL,


writ a program to compare using strcmp VIVA and viva with its output.

0 Answers  


Explain how are 16- and 32-bit numbers stored?

0 Answers  


Write a program that can show the multiplication table.

0 Answers   Student,






What is #define in c?

0 Answers  


Write a small C program to determine whether a machine's type is little-endian or big-endian.

5 Answers   nvidia,


what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); }

1 Answers   Motorola,


c program to arrange digits in a no in ascending and descending order

1 Answers  


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

1 Answers   TCS,


Explain what is the benefit of using #define to declare a constant?

0 Answers  


marge linklist

0 Answers   HCL,


Categories