41.
What is the functionality of the following code? Choose the most appropriate answer.
public int function()
{
	if(head == null)
		return Integer.MIN_VALUE;
	int var;
	Node temp = head;
	while(temp.getNext() != head)
		temp = temp.getNext();
	if(temp == head)
	{
		var = head.getItem();
		head = null;
		return var;
	}
	temp.setNext(head.getNext());
	var = head.getItem();
	head = head.getNext();
	return var;
}

43.
What is the functionality of the following piece of code?
public void fun(int x)
{
	q1.offer(x);
}

46.
What does the following function check for? (all necessary headers to be included and function is called from main)
#define MAX 10
 
typedef struct stack
{
    int top;
    int item[MAX];
}stack;
 
int function(stack *s)
{
    if(s->top == -1)
        return 1;
    else return 0;
}

48.
A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as . . . . . . . .

Read More Section(Introduction to Data Structures)

Each Section contains maximum 100 MCQs question on Introduction to Data Structures. To get more questions visit other sections.