MCQ1 mark
The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree?
Single correct
Answer key coming soon
GATE CSE previous year questions · Programming & Data Structures
Single correct
Answer key coming soon
Single correct
Answer key coming soon
Single correct
Answer key coming soon
#include <stdio.h>
int main() {
int a[4][5]={{1, 2, 3, 4, 5},
{6, 7, 8, 9, 10},
{11, 12, 13, 14, 15},
{16, 17, 18 , 19, 20}};
printf("%d\n", *(*(a+**a+2)+3));
return(0);
}
The output of the program is ___________.Numerical answer
Answer key coming soon
Numerical answer
Answer key coming soon
Single correct
Answer key coming soon
int fun1(int n) { int fun2(int n) {
static int i = 0; static int i = 0;
if (n > 0) { if (n > 0) {
++i; i = i + fun1(n);
fun1(n-1); fun2(n-1);
} }
return(i); return(i);
} }
The return value of fun2(5) is __________.Numerical answer
Answer key coming soon
Numerical answer
Answer key coming soon
int tob(int b, int* arr){ int pp(int a,int b) {
int i; int arr[20];
for(i=0; b>0; i++){ int i, tot = 1, ex, len;
if(b%2) arr[i]=1; ex = a;
else arr[i]=0; len = tob(b,arr);
b = b/2; for(i=0; i<len; i++){
} if(arr[i]==1)
return(i); tot = tot * ex;
} ex = ex * ex;
}
return(tot);
}
The value returned by pp(3,4) is ____________.Numerical answer
Answer key coming soon