Write a sample code to reverse Singly Linked List by iterating through it only once.
1) Divide the list in two parts - first node and rest of the linked list. 2) Call reverse for the rest of the linked list. 3) Link rest to first. 4) Fix head pointer.
What are virtual functions?
Virtual functions are used with inheritance, they are called according to the type of object pointed or referred, not according to the type of pointer or reference.
What is C#?
C# provides the rapid application development. Its syntax is similar to C++ syntax and meets 100% of the requirements of OOPs like the following: Abstraction Encapsulation Polymorphism Inheritance