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

#1
25
views
1 answers
0 votes
Find Output of below Code#include<stdio.h>int sum(int n) { n = 3; if (n == 2) return 2; return sum(n-1)*n ;}int main() { printf("%d\n", sum(5) ); return 0}
#2
67
views
1 answers
1 votes
#include <stdio.h> int main() { // Write C code here int i=10,*p,**q,***r; p=&i; *p=15; q=&p; **q=20; r=&q; ***r=*p+1; printf("%d",i); return 0; }answer the output as integer _________
#3
75
views
1 answers
1 votes
#include <stdio.h> int main() { int (*a)[2]; int arr[4][4]={1,2,3,4,6,7,8,9}; a=arr; ++a; printf("%d",**a); return 0; }what is the answer NUMARICAL--------------------------------?
#4
47
views
0 answers
1 votes
#include <stdio.h> void f(int (*x)(int)); int mysh(int); int (*sh)() = mysh; int main() { f(sh); sh++; for(int x=sh;x>=0;x--){ if(x){ printf ... A:10C:10 i will go thereB:10 i will go there number of timesD:10 i will go here number of times
#5
49
views
1 answers
1 votes
#include <stdio.h> void f(int (*x)(int)); int myfoo(int i); int (*foo)(int) = myfoo; int main() { f(foo(10)); } void f( ... i; }sanfoundry C programming Questiona) Compile time errorb) Undefined behaviourc) 10 11d) 10 Segmentation fault 
#6
35
views
0 answers
0 votes
Not related to gate but genral programming..if some one ask me array indexing start from 0,yes i know array indexing start from 0 . but can i also say ... Array indexing tell me how many steps ahed are from the first position of array,
#8
112
views
1 answers
1 votes
#include <stdio.h> int main () { int i, k; int a [8] = {33,34,35,36,37,40,50,38}; for(i = 0; i < 3; i++) { a[i] = a[i] + 1; i=i+1; } ... int i = k/2; a[i] = a[i] - 1; } printf ("%d",i+a[i]); }Numerical Answer ______________________________
#9
147
views
1 answers
1 votes
what is output of c code : assume answer Is numerical...🙂
#10
95
views
1 answers
1 votes
#include <stdio.h> double pom(double x,int n){ if(n==1) return x; else return x*pom(x,n-1); --n; } int main() { int a=pom(2,5); printf("%d",a); return 0; }what is the output of following c codeA:2B:32C:16D:NONE
#11
79
views
1 answers
1 votes
what is output of this c codeA: 321B: 123C: error(infinite/segmentation)D:333
#12
117
views
2 answers
1 votes
answer the output#include <stdio.h> int main() { int x=0; x++; if(--x){ x=x++; if(x){ printf("hello"); }else{ printf("%d",x); } }else{ x=x+5; if(x){ printf("i win x times"); } else{ printf("you win 5 times"); } } return 0; } 
#13
284
views
1 answers
2 votes
Consider the following function:int arc(int i, int j){if(i<2) return j+2;else if(j<2) return arc(i-1, 1);else return arc(i-1, arc(i, j-2));}The value returned by arc(2, 6) is _________
#14
163
views
1 answers
0 votes
Consider the following function:int arc(int i, int j){if(i<2) return j+2;else if(j<2) return arc(i-1, 1);else return arc(i-1, arc(i, j-2));}The value returned by arc(2, 6) is ____________
#15
157
views
0 answers
0 votes
let suppose address of first index of array is n and size of each block of array is u. then the index of second element is a+u.let suppose the array has m elements. ... array of same size, if it's address of second last element is (n - u).
#16
77
views
0 answers
0 votes
#17
310
views
2 answers
1 votes
#include<stdio.h>#define ADD(a,b)(a+b)#define SQUARE(x)(x*x)int main(){int x=2;int y=3;int z = ADD(SQUARE(x++),y);printf("%d\n",z);return 0;}What is the output of the above code snippet?
#18
255
views
1 answers
0 votes
#include <stdio.h> int main() { int a[3][2] = {1, 3, 5, 7, 9, 11}; int *ptr = a[0]; ptr += sizeof(int); printf("%d", *ptr); return 0; }(Assume size of int to be $2$ bytes.)The output is __________.
#19
369
views
2 answers
1 votes
Problem Statement: Class teacher to IX-C wants to store whether a particular student has passed in exams. The class has a strength of $32$ students. Their roll ... of set bitsd. Apply Bitwise AND (&) operator and count number of set bits
#20
147
views
1 answers
1 votes
Consider the following program: #include <stdio.h> int main(){ int a=2, i; static int b=a++; for(i=0;i<a+b;i++) printf("GATE Wallah"); return 0; ... ) GATE Wallah is printed 4 times.(c) GATE Wallah is printed 5 times.(d) Compilation Error.