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

#921
1.6k
views
0 answers
0 votes
Given a 3D array A[2:8,-4:1,6:10] stored in a row major order, if the base address is 200 and size of an element is 4 byte, what is ... along with formula for calculating 3D Array.(Source:Classic Data Structure Book By Debashish Samanta )
#922
547
views
1 answers
0 votes
++*p and (*p)++both are same????
#923
559
views
0 answers
0 votes
from below list of parameter passing techniques, which parameter passing technique we can implement in c?1) call by value2) call by refference3) call by value result4) call by name5) call by text6) call by need
#924
2.6k
views
2 answers
1 votes
Consider the following c-program:#include<stdio.h>int main() {char *arr[ ] ={"GATE", "CAT", "IES", "IAS", "PSU", "IFS" };call(arr);return 0;}void ... the output of the above program?(Assume size of int,pointer is 4B).A)IESB)IASC)CATD)PSU
#925
4.5k
views
2 answers
0 votes
which of the following data structure is efficient to implement priority queue with basic operations such as insertion,deletion and searching?A)linked listB)HeapC)Sorted arrayD)Unsorted array
#926
1.6k
views
2 answers
0 votes
#include<stdio.h> void print(int n) { if (n > 4000) return; printf("%d ", n); print(2*n); printf("%d ", n); } int main() { print(10); getchar(); return 0; } PLEASE EXPLAIN THE OUTPUT
#927
424
views
0 answers
0 votes
What does fun2() do in general?int fun(int x, int y){ if (y == 0) return 0; return (x + fun(x, y-1));} int fun2(int a, int b){ if (b == 0) return 1; return fun(a, fun2(a, b-1));}
#928
720
views
0 answers
3 votes
I AM NOT GETTING THE CONCEPT OF DANGLING POINTER HERE . PLEASE EXPLAIN?
#929
3.8k
views
1 answers
0 votes
What does the following function print for n = 25?void fun(int n){ if (n == 0) return; printf("%d", n%2); fun(n/2);}
#930
3.7k
views
0 answers
1 votes
Consider the following recursive function fun(x, y). What is the value of fun(4, 3)int fun(int x, int y){ if (x == 0) return y; return fun(x - 1, x + y);}
#932
443
views
2 answers
1 votes
what will be the output of the following:main(){ int i=4; printf(++i, ++i, ++i); i=4; printf(i++, i++, i++);}
#933
502
views
3 answers
1 votes
What is the output of the program:extern int a;main(){ extern int a; printf(a);}
#934
145
views
1 answers
1 votes
what is the output of the followingmain(){ extern int a; printf("%d",a);}
#935
351
views
1 answers
2 votes
please explain the memory allocation of statement , means how it worksregister int a= 10;
#936
788
views
1 answers
0 votes
What is the interpretation of following C declaration:char *(*(**foo[][8])())[];(A) foo is array of 8 pointer to pointer to function returning ... pointer to pointer to function returning pointer to array of pointer to char.(D) None
#937
6.3k
views
1 answers
1 votes
The following is a C code-int main(void) { char buff[10]; memset(buff,0,sizeof(buff)); gets(buff); printf(" The buffer entered is [%s] ",buff); ... compiled but it may lead to buffer over overflow sometimes.(D) The program has no issue
#938
823
views
1 answers
0 votes
What is the output of this program?int main(void){int a = 10, b = 20, c = 30;printf(" %d..%d..%d ", a+b+c, (b = b*2), (c = c*2));return 0;}(A) ... .60(B) 110..40..60(C) 110..20..30(D) 60..20..30does sequence point comes into picture here?
#939
461
views
2 answers
1 votes
void main() { char*s[]={"iceland","Greenland","Ireland","Switzerland"}; char **ptr[]={s+3,s+2,s+1,s}; char ***p=ptr; printf(\%s ",**++p); printf(\%s ",*(*++p+3); printf(\%s ",*p[-2]+3); printf(\%s ",p[-1][-1]+1); }
#940
716
views
1 answers
2 votes
A. Total no. of trees that were there in the forest.B. Total no. of nodes in the forest.C. Total no. of nodes which have only right child.D. Return max element among all nodes.