Recent questions in Programming and DS

2 votes
2 answers
4984
1 votes
2 answers
4985
Consider the following program:# define Rec(a) a + a * aint a;a = 20 + Rec(a) * Rec(a + 1);printf(“%d”, a)return 0;}The output of above program for a = 3 is ________....
0 votes
1 answer
4986
The cost of optimal binary serch tree for the identifier set (a1,a2,a3) = (do , if , while ) with p(1) =0.3,p(2) =0.2, p(3) = 0.15, q(0) = 0.05,q(1) = 0.15...
0 votes
2 answers
4988
the height of tree is the length of the longest of the longest root to leaf path in it.the max and min no of nodes of height 5 are_________
2 votes
3 answers
4989
Consider a three dimensional array A[50][20][30] stored in linear array in column major order . If the base address starts at 1000, the location of A[20][10][10] is ..? (...
1 votes
1 answer
4991
Consider the following C program segment:#include <stdio.h main() { static char*s[] = {"black","white","yellow","violet"}; char ptr[]={s+3,s+2,s+1,s}, *p; p=ptr; ++P; pr...
2 votes
3 answers
4994
2 votes
3 answers
4995
Insert the given values in the order in initially empty $\text{AVL}$ tree.$\text{34,21,10,27,24,43,15,6}$What is the value at the root of the tree$?$
8 votes
2 answers
4996
2 votes
2 answers
4997
If I have numbers from {1,2,...7} then in how many ways can I form an AVL tree without any rotation required ?How to approach this question ?
3 votes
1 answer
4999
In C programming language x &ndash; = y + 1 ; means(1)x= x-y+1(2)x=-x-y-1(3)x=-x+y+1(4)x= x-y-1
0 votes
2 answers
5000
Consider the C function func shown below: int func(int num) { int count = 0; while (num) { count++; num>>= 1; } return (count); }The value returned by func(0235) is _____...