MCQ1 mark
Which one of the following sequences when stored in an array at locations A[1], . . . , A[10] forms a max-heap?
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 funcp(){
static int x = 1;
x++;
return x;
}
int main(){
int x,y;
x = funcp();
y = funcp()+x;
printf("%d\n", (x+y));
return 0;
}Numerical answer
Answer key coming soon
Single correct
Answer key coming soon
typedef struct node {
int val;
struct node *left, *right;
} node;
int foo(node *p) {
int retval;
if (p == NULL)
return 0;
else {
retval = p->val + foo(p->left) + foo(p->right);
printf("%d ", retval);
return retval;
}
}
When foo is called with a pointer to the root node of the given binary tree, what will it print?
Single correct
Answer key coming soon
Numerical answer
Answer key coming soon