Hot questions in Programming and DS

0 votes
1 answer
2552
0 votes
1 answer
2553
What should be the output of the code? #include<stdio.h>union data{ int a; float b;} ;int main(){union data a1;a1.a=4;a1.b=32768.0;printf("%d \n%f",a1.a,a1.b);ret...
29 votes
3 answers
2555
Let $x$ be an integer which can take a value of $0$ or $1$. The statementif (x == 0) x = 1; else x = 0;is equivalent to which one of the following ?$x = 1 + x;$$x = 1 - ...
0 votes
0 answers
2556
What is the maximum height of a binary tree of order p consisting of n keys?a) logp/2(n+1)/2b)log pnc)log p/2 n+1d) None of these
0 votes
0 answers
2557
a) Calculate the no. of leavesb) Calculate the no.of internal nodesc) Calculate the total no. of nodesd) Calculate the height. Please show how the recursion is working he...
0 votes
1 answer
2559
Its answer comes to be in table [5] what should be answer as it starts from 0 then I think answer should be 6 but in test it was given as 5 . please answer
7 votes
3 answers
2560
0 votes
1 answer
2561
Consider the following min-heap tree data Inorder;- 110,100,120,60,90,70,80,10,140,130,150,20,50,Postorder??
0 votes
1 answer
2562
describe the BFS traversal for this.
0 votes
1 answer
2563
The output of statement printf ("%d", 10 ? 0 ? 5 : 11 : 12 ) ;
1 votes
1 answer
2564
What is the following function doing? unsigned fun(unsigned a, unsigned b) { int i; unsigned j = 0; for(i = 0; i < 32; i++) { j <<= 1; j += !!(a & 0x80000000); a <<= 1; i...
0 votes
1 answer
2565
printf("The ASCII value of %c = %d\n",i,i); what is the meaning of this line why i,i written in the code.
3 votes
1 answer
2566
main() { float a=.5, b=.7; if(b<.7) if(a<.5) printf("TELO"); else printf("LTTE"); else printf("JKLF"); }
0 votes
0 answers
2567
What is the time complexity of f(f(x,y),y)?
0 votes
2 answers
2568
What will be the last element of the max-heap formed by given element : 4 , 1 ,3, 2, 16, 9, 10, 14, 8, 7a) 4b) 6c) 51) 1According to me, last element is 2. But is in not...
1 votes
1 answer
2569
Which sorting algorithm is good if we already knew the range of number -Counting Sort OR Radix Sort
0 votes
0 answers
2570
What is the expected number of probes for an unsuccessful search for an open address hash table with 10000 slots containing 9800 entries?a)4b)10c)20d)50