MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
If START=NULL in linked list then we need to write ____ Message.
A
Overflow
B
Underflow
C
both
D
none of above
Explanation: 

Detailed explanation-1: -A linked list is represented by a pointer to the first node of the linked list. The first node is called the head of the linked list. If the linked list is empty, then the value of the head points to NULL.

Detailed explanation-2: -Underflow is a condition that occurs when we try to delete a node from a linked list that is empty. This happens when START = NULL or when there are no more nodes to delete.

Detailed explanation-3: -Jein when head==NULL is true, it means that head is not assigned any location in the memory.. since it is a struct type, it will be assigned a reference. Through that reference you can access its data or values. So null means not have any reference or memory.

Detailed explanation-4: -When new data is to be inserted into the data structure but there is no available space i.e. free storage list is empty this situation is called overflow. When we want to delete data from a data structure that is empty this situation is called underflow.

There is 1 question to complete.