View Count: 0 Duration: 14 mins Accessed date: Not Yet Viewed View Count: 0 Duration: 54 mins Accessed date: Not Yet Viewed View Count: 0 Duration: 34 mins Accessed date: Not Yet Viewed View Count: 0 Duration: 42 mins Accessed date: Not Yet Viewed
###### Post your comment / feedback here

Question No: 1 of 10
In single linked list which operations depends on the length of the list?
Options:
1. Delete the last element of the list
2. Add an element before the first element of the list
3. Delete the first element of the list
4. Inter change the first two elements of the list
a
Explanation:

Question No: 2 of 10
Which of the following segment of code deletes the element pointed to by X from the double linked list, if it is assumed that X points to the first element of the list and start pointer points to beginning of the list?
Options:
1. X->bwd=X->fwd; X->fwd=X->bwd;
2. start=x->fwd; start->bwd=NULL;
3. start=x->fwd; x->fwd=NULL;
4. x->bwd->bwd=x->bwd; x->fwd->fwd=x->fwd;
b
Explanation:

Question No: 3 of 10
Which among the following segment of code deletes the element pointed to by x from the double linked list, if it is assumed that X points to the last element of the list?
Options:
1. X->fwd->bwd=NULL;
2. X->bwd->fwd=x->bwd;
3. X->bwd->fwd=NULL;
4. X->fwd->bwd=x->bwd;
c
Explanation:

Question No: 4 of 10
Which among the following segment of code counts the number of elements in the double linked list, if it is assumed that X points to the first element of the list and ctr is the variable which counts the number of elements in the list?
Options:
1. for(ctr=1;x!=NULL;ctr++) x=x->fwd;
2. for(ctr=1;x!=NULL;ctr++) x=x->bwd;
3. for(ctr=1;x->fwd!=NULL;ctr++) x=x->fwd;
4. for(ctr=1;x->bwd!=NULL;ctr++) x=x->bwd;
a
Explanation:

Question No: 5 of 10
Which among the following segment of code counts the number of elements in the double linked list, if it is assumed that X points to the last element of the list and ctr is the variable which counts the number of elements in the list?
Options:
1. for(ctr=1;x!=NULL;ctr++) x=x->fwd;
2. for(ctr=1;x!=NULL;ctr++) x=x->bwd;
3. for(ctr=1;x->fwd!=NULL;ctr++) x=x->fwd;
4. for(ctr=1;x->bwd!=NULL;ctr++) x=x->bwd;
b
Explanation:

Question No: 6 of 10
Which among the following segments of inserts a new node pointed by X to be inserted at the end of the double linked list? The start and last pointer points to beginning and end of the list respectively.
Options:
1. X->bwd=x->fwd; x->fwd=x->bwd;
2. X->fwd=start; ltart->bwd=x;
3. last->fwd=x; x->bwd=last;
4. x->bwd=x->bwd; x->fwd=last;
c
Explanation:

Question No: 7 of 10
A single linked list is declared as follows:
struct slist
{
struct slist *next;
int data;
}
Where among the following segments of code deletes the element pointed to by x from the single linked list, if it is assumed that x points to neither the first nor last element of the list? prev pointer points to previous element.
Options:
1. prev->next=x->next; free(x);
2. x->next=prev->next; free(x);
3. prev->next=x->next; free(prev);
4. x->next=prev->next; free(prev);
a
Explanation:

Question No: 8 of 10
Which among the following segment of code deletes the element pointed to by X from the single linked list, if it is assumed that X points to the last element of the list and prev pointer points to last but one element?
Options:
1. prev->next=NULL; free(prev);
2. x->next=NULL; free(X);
3. prev->next=NULL; free(X);
4. x->next=prev; free(prev);
c
Explanation:

Question No: 9 of 10
Which among the following segments of code inserts a new node pointed by X to be inserted at the beginning of the single linked list? The start pointer points to beginning of the list.
Options:
1. Start->next=x; X=start;
2. X->next=start; Start=X;
3. X->next=start->next; Start=X;
4. X->next=start; Start=x->next;
b
Explanation:

Question No: 10 of 10
Which of the following segments of code inserts a new node pointed by x to be inserted at the end of the circular double linked list? The start pointer points to beginning of the list
Options:
1. X->bwd=start; X->fwd=start->fwd; Start->bwd->fwd=X; Start=X;
2. X->bwd=star->bwdt; X->fwd=start; Start->bwd-=X; Start=X;
3. X->bwd=start->bwd; X->fwd=start; Start->bwd->fwd=X; Start->bwd=x;
c
Explanation:

1