Webpage

Programming in C. Recursion.

$$\scriptsize{\overset{{\large{\textbf{Mark Distribution in Previous GATE}}}}{\begin{array}{|c|c|c|c|c|c|c|c|}\hline
\textbf{Year} &\textbf{2024-1}&\textbf{2024-2}&\textbf{2023}& \textbf{2022}&\textbf{2021-1}&\textbf{2021-2}&\textbf{Minimum}&\textbf{Average}&\textbf{Maximum}
\\\hline\textbf{1 Mark Count} & 2&2&1&1 &0&2&0&1.33&2
\\\hline\textbf{2 Marks Count} &1&1&0& 2&2&2&0&1.33&2
\\\hline\textbf{Total Marks} &4&4&1& 5&4&6&\bf{1}&\bf{4}&\bf{6}\\\hline
\end{array}}}$$

Recent questions in Programming

#661
559
views
0 answers
0 votes
i have not read lvalue is it there in syllabus and how to do this
#663
1.1k
views
0 answers
0 votes
i am getting 12 please check it
#664
848
views
0 answers
0 votes
Please correct if any of the point is wrong :Quicksort:1.Need more random accesses2 Used when Random access is fast (hence preferred on array and not on ... makes it faster than merge sort in many cases like in virtual memory environment.
#665
395
views
0 answers
0 votes
Why do we need a Build Heap procedure ?if we want to build a heap, we will call max_heapify on root node and we will form a heap in O(log N) TC.if we use build heap, it will take O(N) TC, what is the use im not getting ?please explain.
#666
345
views
1 answers
0 votes
Are any modifications to the value of a dynamically scoped variable persistent even after the function (in which modifications were made) returns? ... scoped variables essentially act like global variables in this particular regard?
#667
278
views
1 answers
2 votes
Stack A has entries a,b,c,d(with a on top).Stack B is empty.An entry popped out of stack A is pushed into stack B.An entry popped ... printing the elements are __ ?24122114can anybody give a generalized formula with explanation for this ?
#668
467
views
1 answers
0 votes
In a lower triangular matrices (size 15 15) representation of compact single dimensional array, non-zero elements (i.e. elements of the lower triangle) of each row ... array is stored at location 1000, then the address of element A[10][6]
#669
271
views
0 answers
0 votes
#670
132
views
0 answers
0 votes
#671
330
views
0 answers
1 votes
#672
2.6k
views
3 answers
12 votes
Given the following pseudocode for function $\text{printx()}$ below, how many times is $x$ printed if we execute $\text{printx(5)}?$void printx(int n) { if(n==0){ printf(“x”); } for(int i=0;i<=n-1;++i){ printx(n-1); } }$625$256$120$24$5$
#673
2.1k
views
2 answers
5 votes
Consider the following program fragment:var a,b : integer; procedure G(c,d: integer); begin c:=c-d; d:=c+d; c:=d-c end; a:=2; b:=3; G(a,b);If both parameters to $G$ are ... $a=3$ and $b=2$a=2$ and $b=3$a=1$ and $b=5$None of the above
#674
3.8k
views
2 answers
12 votes
Consider the following program fragment:var x, y: integer; x := 1; y := 0; while y < x do begin x := 2*x; y := y+1 end;For the above fragment , which of the ... $x=2^y$None of the above, since the loop does not terminate
#675
454
views
3 answers
1 votes
Which operator has higher priority between *and / in any expression how to evaluate them
#676
1.1k
views
2 answers
0 votes
Suppose x and y are floating-point variables that have been assigned the values x=8.8 and y=3.5. what will be the value of the following expression?2*x/3*y
#677
383
views
0 answers
0 votes
int main() { int i, j = 1; for(i = 1; i < 100) { j = j * i; i++; if(i == j) break; } }Which of the following is always correct at the end of the loop.s1: (i = ... if i = n; then j = (n-1)!; n be some random values3: (i = 100) or (i == j)
#678
343
views
1 answers
0 votes
if array declared size is larger than values initialised. Then what value rest memory elements have , 0 or garbage?
#679
252
views
0 answers
0 votes
from Dennis Ritchie a[i] = i++ The question is whether the subscript is the old value of i or the new value My doubt:we already know ++ ' has higher ... i;i++;How it creates ambiguity...i iran it on compiler and ran as i mentioned
#680
168
views
0 answers
0 votes
Consider the following recursionT(n, c) = $\Theta$(n)$ for $ c <= 2 $T(c, n) = $\Theta$(n)$ for $ c <=2$T(n, n) = $\Theta$(n) + T(n, n/2)$Which of the following is correct asymptotic complexity for above recurrence relation?