Answer the following in short.
Data structures - ISC Class 12 Computer Science Questions with Answers, Page 4
87 past-paper questions on Data structures from ISC Class 12 Computer Science papers (2026-2017), newest first, in full. Questions 61-80 are on this page, 20 to a page. Tap "Show answer" under a question to see its answer.
Nothing matches. Try fewer letters.
Answer the following questions from the binary tree.
Show answer
Answer
AIAnswer the following questions from the binary tree.
Show answer
Answer
AIAnswer the following questions from the binary tree.
Show answer
Answer
AIAnswer the following in short.
Show answer
Answer
AIDifferentiate between the following.
Show answer
Answer
AIDifferentiate between the following.
Show answer
Answer
AIAnswer the following about the data structure described.
Show the case
Show answer
Answer
AIAnswer the following about the data structure described.
Show answer
Answer
AIvoid pushadd(String n)
{
if (end == size)
System.out.println("NO SPACE");
else
{
Q[end] = n;
end++;
}
}
String popadd()
{
if (start == end)
return "?????";
else
{
String val = Q[start];
start++;
return val;
}
}Explanation: pushadd(String) checks whether end has reached size (diary full) before storing the address n at index end and incrementing end; otherwise it prints "NO SPACE". popadd() checks whether the diary is empty (start==end), returning "?????" in that case; otherwise it returns the address at index start and advances start, so addresses always leave from the front in the order they were added. Tested (run for real, capacity 3): after 3 successful pushadd calls a 4th correctly printed "NO SPACE"; popadd() correctly returned the addresses in FIFO order and finally returned "?????" once the diary was emptied.Answer the following questions from the binary tree.
Show answer
Answer
AIAnswer the following questions from the binary tree.
Show answer
Answer
AIAnswer the following in short.
Show answer
Answer
AIAnswer the following questions from the binary tree.
Show answer
Answer
AIWrite the program described below.
class Node
{
int num;
Node next;
}
Write an Algorithm OR a Method to find and display the sum of even integers from an existing linked list.
The method declaration is as follows:
void SumEvenNode( Node str )Show answer
Answer
AIvoid SumEvenNode(Node str)
{
int sum = 0;
Node temp = str;
while (temp != null)
{
if (temp.num % 2 == 0)
sum = sum + temp.num;
temp = temp.next;
}
System.out.println("Sum of even integers = " + sum);
}(Verified by running the code: for a list 3->4->7->10->5, the method correctly printed "Sum of even integers = 14", i.e. 4+10.)Write the program described below.
Show answer
Answer
AIvoid push(String n)
{
if (top == cap - 1)
System.out.println("OVERFLOW");
else
{
top++;
stud[top] = n;
}
}
String pop()
{
if (top == -1)
return "$$";
else
{
String val = stud[top];
top--;
return val;
}
}Explanation: push(String) checks whether the register is full (top has reached cap-1); if so it prints "OVERFLOW", otherwise it increments top and stores the new name at that top location. pop() checks whether the register is empty (top == -1), returning "$" in that case; otherwise it returns the name at the current top location and decrements top, so names are always added and removed from the same (topmost) end. Tested (run for real, capacity 3): after 3 successful push calls, a 4th correctly printed "OVERFLOW"; pop() correctly returned the names in LIFO order (ROHIT, SUMIT, AMIT) and finally returned "$" once emptied.Answer the following questions from the binary tree.

Show answer
Answer
Answer the following questions from the binary tree.

Show answer
Answer
Answer the following.
class Node
{
int n;
Node link;
}
Write an Algorithm OR a Method to search for a number from an existing linked list.
The method declaration is as follows:
void FindNode( Node str, int b )Show answer
Answer
AIvoid FindNode(Node str, int b)
{
Node temp = str;
while (temp != null)
{
if (temp.n == b)
{
System.out.println(b + " is found");
return;
}
temp = temp.link;
}
System.out.println(b + " is not found");
}(Verified by running the code on a 3-node list: correctly reports a middle value as found and a value absent from the list as not found.)Answer the following.
Show answer
Answer
AIWrite the program described below.