Time Left - 10:00 mins
IIIT Hyderabad Practice Quiz : Data Structures-4
Attempt now to get your rank among 397 students!
Question 1
What does the following code do on doubly linked list, where ‘L’ points to Left Most Node.
(i) Struct Dnode *t = L
(ii) L = L → Rlink;
(iii) L → Llink = Null;
(iv) free(t);
Note: ‘’struct Dnode’’ is user defined type to create a doubly linked list node.
Question 2
Consider the following piece of code.
SOF(struct node * s)
what does this SOF function returning to the calling function, if it is called with passing the satrt address of a single linked list?
Question 3
What is the output of the program.?
void myshow();
int main()
{
myshow();
myshow();
myshow();
}
void myshow()
{
static int k = 20;
printf("%d ", k);
k++;
}
Question 4
The equivalent prefix expression for the following infix expression (A+B)-(C+D*E)/F*G is
Question 5
Consider a single array A[0…..n – 1] is used to implement two stacks. Two stacks grows from opposite ends of the array. Variables top 1 and top 2 points to the location of the top most element in each of the stacks with with initial values of –1 and n respectively and top 1 < top 2 always. If certain push and pop operations are performed at either end, then which of the following represents the number of elements are present in the array at any time?
- 397 attempts
- 1 upvote
- 5 comments
Jun 11GATE & PSU CS