2,042 views
2 votes
2 votes

1 Answer

Best answer
4 votes
4 votes

The only option false in the above question is (C)

Reasons To back my Answer:

1. It is always required to chek the underflow and overflow conditions. It will throw an error : Invalid memory access error.

2. It is obvious from the the diagram below.

​​​​​​​

3. If we move the head then the previous data will be lost , so it is always advisable to use another pointer "p" to navgate in a link list.

selected by

Related questions

684
views
1 answers
0 votes
Vaishnavi01 asked Sep 17, 2018
684 views
struct node* foo(struct node* a, struct node* b){ struct node* result, *rec; if(a==null) return b; else if(b==null) return a; else { rec=foo(a->next,b->next); result=a; a->next=b; b->next=rec; return result;}}
1.1k
views
1 answers
4 votes
RahulVerma asked Apr 26, 2017
1,120 views
I was trying to implement the Linked List code in C. It compiles fine but doesn't give any output. What seems to be the error? I think I ... function.- Return the modified head node by the function.Please read about Reference Semantics.
1.1k
views
1 answers
0 votes
gagan55 asked Jul 13, 2023
1,107 views
How to Visualize this code ?#include<stdio.h> #include<stdlib.h> struct node{ int data; struct node *next; }; void addFirst(struct node **head,int val){ ... addFirst(&head,30); addFirst(&head,40); addFirst(&head,50); printList(head); }