Hot questions in Programming and DS

1 votes
1 answer
1711
Consider the following C function:void foo(int n) { while(n!=0) { if(!(n&1)) printf("*"); n=n>>1; } }The number of times printf (“*”) statement is executed, when the ...
0 votes
0 answers
1712
0 votes
0 answers
1713
The correct answer as you can see is given bellow but I think the condition a[k]>a[max] is wronginstead a[k]<a[max] is correct…someone please check it….!
0 votes
0 answers
1715
how the o/p came?
–1 votes
1 answer
1718
0 votes
0 answers
1719
IS IT CORRECT…??
0 votes
0 answers
1720
0 votes
0 answers
1721
main(){int ar[5],a=0; ar={4,5,6,0,3}fun(ar[a],ar[ar[a])}// will the called function be resolved to fun(0,3) at compile time ?? [Code Optimization:Folding]
1 votes
3 answers
1724
The number of binary search trees possible with 12 keys, when keys 1, 2, 3, 4, ........ 12 are inserted into empty Binary Search Tree with condition such that 4 is the r...
0 votes
1 answer
1725
Which of the following data structure is efficient to implement priority queue with basic operation such as insertion, deletion and searching?A) Linked listB) Sorted arra...
0 votes
0 answers
1726
2 votes
0 answers
1729
1 votes
0 answers
1730
What is the logic behind this code.#include <stdio.h void main() { int x; x = 3 2 1; printf("%d", x); return; }