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

#301
30.6k
views
11 answers
40 votes
Consider the following $\text{ANSI C}$ program.#include <stdio.h int main() { int arr[4][5]; int i, j; for (i=0; i<4; i++) ​​​​​​{ for (j=0; j<5; j++) { arr[i...
#302
9.9k
views
2 answers
17 votes
Consider the following $\text{ANSI C}$ program:#include <stdio.h #include <stdlib.h struct Node{ int value; struct Node *next;}; int main( ) { struct Node *boxE, *head, *...
#303
9.3k
views
4 answers
19 votes
​​​​​Consider the following$\text{ ANSI C}$ program.#include <stdio.h int main() { int i, j, count; count=0; i=0; for (j=-3; j<=3; j++) { if (( j >= 0) && (i++)...
#304
2.9k
views
3 answers
3 votes
Suppose you are compiling on a machine with $1$-byte chars, $2$-byte shorts, $4$-byte ints, and $8$-byte doubles, and with alignment rules that require the address of eve...
#305
1.3k
views
1 answers
4 votes
An external variableis globally accessible by all functionshas a declaration “extern” associated with it when declared within a functionwill be initialized to $0$ if ...
#306
2.0k
views
1 answers
2 votes
If initialization is a part of declaration of a structure, then storage class can beautomaticregisterstaticanything
#307
902
views
1 answers
2 votes
For $x$ and $y$ are variables as declared below $\textit{double }x=0.005, \: y = – 0.01;$ What is the value of $\text{ceil }(x+y)$, where $\text{ceil }$ is a function t...
#308
1.2k
views
3 answers
1 votes
In C programming language, if the first and the second operands of operator $+$ are of types int and float, respectively, the result will be of type intfloatcharlong int
#309
1.4k
views
1 answers
1 votes
What will be the value of $x$ and $y$ after execution of the following statement(C language) n = 5; x = n++; y = -x;$5,-4$$6,-5$$6,-6$$5,-5$
#310
992
views
1 answers
0 votes
The question is based on the following program fragment.f(intY[10],int x){ int u,j,k; i=0;j=9; do{ k=(i+j)/2; if(Y[k] < x) i=k; else j=k; } while((Y[k]!=x) && (i<j)); if ...
#311
860
views
2 answers
1 votes
What will be the output of following?main() { Static int a = 3; Printf(“%d”,a ); If(a) main(); }$3$$3\;2\;1$$3\;3\;3$Program will f...
#312
575
views
0 answers
0 votes
The following program fragment printsint i = 5; do { putchar(i+100); printf(“%d”, i ;) } while(i);i5h4g3f2el14h3g2f1e0An error messageNone of the above
#313
969
views
3 answers
1 votes
Consider the following declaration.int a, *b = &a, c = &b; a = 4; c = 5;If the statementb = (int *) cIs appended to the above program fragment thenValue of $b$ becomes ...
#314
1.0k
views
1 answers
3 votes
The following program fragment printsint i = 5; do { putchar(i+100); printf(“%d”, i ;) } while(i);i5h4g3f2el14h3g2f1e0An error messageNone of the above
#315
734
views
3 answers
1 votes
What will be the output of following?main() { Static int a = 3; Printf(“%d”,a ); If(a) main(); }$3$$3\;2\;1$$3\;3\;3$Program will f...
#316
849
views
1 answers
1 votes
The question is based on the following program fragment.f(intY[10],int x){ int u,j,k; i=0;j=9; do{ k=(i+j)/2; if(Y[k] < x) i=k; else j=k; } ...
#317
1.9k
views
2 answers
2 votes
Which of the following is illegal declaration in $C$ language?char*str ="Raj is a Research scholar";char str[25] ="Raj is a Research scholar";char str[40] ="Raj is a Rese...
#318
2.0k
views
3 answers
3 votes
What is the correct way to round off $x$, $a$ $\text{float}$ to an $\text{int}$ value?$y=(\text{int})(x+0.5)$$y=\text{int} (x+0.5)$$y=(\text{int}) x+0.5$$y=(\text{int})(\...
#319
2.2k
views
6 answers
5 votes
What error would the following function give on compilation? f(int a, int b) { int a; a=20; return a; }Missing parenthesis is $\textit{return}$ statement.Function should ...
#320
2.2k
views
1 answers
4 votes
Prior to using a pointer variable it should bedeclared.initialized.both declared and initialized.none of these.