Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Traversal of linked list always starts from First Node - Data Structure
Home
>>
Category
>>
Programming Language (MCQ) questions
>>
Data Structure
Q. Traversal of a linked list always starts from the __________.
- Published on 27 Aug 15
a.
First Node
b.
Middle Node
c.
Last Node
d.
None of the Above
ANSWER: First Node
Related Content
Networking (
207
)
Database (
97
)
C programming (
58
)
Software Engineering (
28
)
SQL (
5
)
HTML (
74
)
Web Technologies (
11
)
Data Structure (
140
)
Operating System (
96
)
Java (
25
)
Oracle (
5
)
C++ (
50
)
Algorithms (
7
)
PL/SQL (
13
)
JavaScript (
7
)
XML (
0
)
CSS (
1
)
Discussion
Nirja Shah
-Posted on 18 Nov 15
Traversal of a linked list always starts from the First Node.
Example:
struct node
{
Int data;
struct node ∗ link;
} ∗ start;
For traversing a single link list we will take a pointer P of type struct node and initialized with start.
P=start;
Now P points to the first node of link list. Link list can be traversed as follows.
while(P ! NULL)
{
cout << (P→ data);
P = P→link;
}
➨
Post your comment / Share knowledge
Required!
Required!
Invalid Email Id!
Required!
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
MCQs
English
Tutorials
Download
▲