Time Left - 20:00 mins
GATE 2023 Programming & Data Structures Evaluation Quiz 1
Attempt now to get your rank among 173 students!
Question 1
Consider the following code:
int main()
{
char *P[5] ={“DELHI”, “MUMBAI”, “SURAT”, “JAIPUR”, “NOIDA”};
char **ptr[5] = {P+1,P+2, P+3,P,P+4};
char ***S = ptr;
S++;
printf(“%s”, *(S[-2])+3);
printf (“%s”, S[-1][-1]+1);
}
The output of the above code is:
Question 2Multiple Correct Options
Which of the following is/are correct?
Question 3
Arrange the following Data-structures in the non-decreasing order of worst case time complexities on the operation Search :
Binary Search Trees, Linked List, Array, Hash Table
Binary Search Trees, Linked List, Array, Hash Table
Question 4
Which of the following is not a Linear Data Structure?
Question 5
Match the following :
Question 6
What of the following is valid DFS?
Question 7
What is the value printed by the following C program?
#include<stdio.h>
int fun(int *a , int n)
{
if(n<=0)
return 0;
else if(*a % 3 != 0)
{
return *a + f(a+1,n-1);
}
else
{
return *a - f(a+1,n-1);
}
}
int main()
{
int a[]= {12,4,5,6,15};
printf(“%d”,fun(a,5));
return 0;
}
#include<stdio.h>
int fun(int *a , int n)
{
if(n<=0)
return 0;
else if(*a % 3 != 0)
{
return *a + f(a+1,n-1);
}
else
{
return *a - f(a+1,n-1);
}
}
int main()
{
int a[]= {12,4,5,6,15};
printf(“%d”,fun(a,5));
return 0;
}
Question 8
What is the output of the above program?
- 173 attempts
- 0 upvotes
- 1 comment
Aug 19GATE & PSU CS