Recent questions in Programming and DS

9 votes
5 answers
4803
The for loopfor (i=0; i<10; ++i) printf("%d", i&1);prints0101010101011111111100000000001111111111
10 votes
4 answers
4804
The output of the following program ismain() { static int x[] = {1,2,3,4,5,6,7,8} int i; for (i=2; i<6; ++i) x[x[i]]=x[i]; for (i=0; i<8; ++i) printf("%d", x[i]); }1 2 3 ...
8 votes
2 answers
4805
Consider the following program fragmenti=6720; j=4; while (i%j)==0 { i=i/j; j=j+1; }On termination j will have the value4896720
7 votes
3 answers
4806
The following programmain() { inc(); inc(); inc(); } inc() { static int x; printf("%d", ++x); }prints 012prints 123prints 3 consecutive, but unpredictable numbersprints 1...
0 votes
0 answers
4807
In a B tree of order m with p nodes the average number of splits is at most:$\frac{1}{(\lceil \frac{m}{2} \rceil -1)}$$(\lceil \frac{m}{2} \rceil -1)$$\frac{1}{\frac{m}{2...
1 votes
1 answer
4808
______ comparisons are necessary in the worst case to find both the maximum and minimum of n numbers.2n &ndash; 2n + floor (lg n) &ndash; 2floor ($\frac{3n}{2}$) &ndash; ...
1 votes
1 answer
4809
What are the 3 Most Prominent use of Data Structure That creates the requirement of Data structure in every programming language . ​
0 votes
1 answer
4810
main ( ){ int a = 2, b, c; a* = b = c = 4; a = b = c;printf (“%d”, a);a = = (b = c);printf (“%d”, a);} What will be the output?(a) 1, 4 ...
0 votes
0 answers
4812
0 votes
1 answer
4813
If we delete a record to which another record contains a pointer, then that pointer is called aPinned pointerDangling pointerPointless pointerNone of the above
0 votes
1 answer
4814
"a healthy mind resides in a healthy body"
9 votes
2 answers
4815
The queue data structure is to be realized by using stack. The number of stacks needed would beIt cannot be implemented2 stacks4 stacks1 stack
7 votes
1 answer
4816
If the sequence of operations - push (1), push (2), pop, push (1), push (2), pop, pop, pop, push (2), pop are performed on a stack, the sequence of popped out values2,2,1...
2 votes
1 answer
4817
0 votes
1 answer
4819
Suppose we have a circular array implementation of a queue, with 9 items in the queue stored at data[7] through data[15]. The CAPACITY is 19. Where does the push member f...