Q1. What is the output of the given program? Give reason.
#include
main(){
struct point {
int x, y;
} polygon[]={{1, 2},{1, 4},{2, 4},{2, 2}};
struct point *ptr;
ptr = polygon;
ptr++;
ptr -> x++;
printf(“\n %d”, ptr -> x);
}
Q2. find out the time complexity of the given relation:
T(n) = 5*N3 + N2 + 2*N
Q3. prepare down the demerits of linear representation of the binary tree.
Q4. describe different elements of the greedy strategy.
Q5. Define the term Graph and list any three application area of the graph.
Q6. describe any two Hash functions by using appropriate illustrations.
Q7. Which sorting algorithm is simply adaptable to singly linked lists? Describe your answer.