Time Left - 15:00 mins

GATE CS 2022 : Data structure -3

Attempt now to get your rank among 313 students!

Question 1

include <stdio.h>
static int i=20;
int main ( )
{
i=5;
for (i=0;i<5;i++)
{
static int x=20;
printf(“%d”, x++);
}
return 0;
}
What is the output?

Question 2

What will be the output of following code?
#include<stdio.h>
int main()
{
int i=3, *j, k=0;
j = &i;
printf("%d%d\n", i**j*i+*j,k);
return 0;
}

Question 3

Consider the following function:

What is the number of recursive calls made by the above function considering the assumption that n>=m?

Question 4

Consider a sorted circular doubly-linked list where the head element points to the smallest element in the list, so what is the complexity in terms of Big-Oh for determining the median element in this doubly-linked list?

Question 5

Given a sequence of operation performed on a stack:
PUSH(2) ,PUSH(4) ,POP , PUSH(6), PUSH(7), POP, POP, PUSH(9), POP, POP
What will be the sequence of value popped out?

Question 6

Which of the following data structure used by recursion?
  • 313 attempts
  • 5 upvotes
  • 6 comments
May 15GATE & PSU CS

Posted by:

Harshita AgarwalHarshita AgarwalMember since Jul 2020
Share this quiz   |