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

#1141
211
views
1 answers
0 votes
Its answer comes to be in table [5] what should be answer as it starts from 0 then I think answer should be 6 but in test it was given as 5 . please answer
#1142
290
views
1 answers
0 votes
#include <stdio.h>void f(char**);int main(){ char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl" }; f(argv); return 0;}void f(char **p){ ... ("%s\n", t);}unable to understand the line t = (p += sizeof(int))[-1];please explain..
#1143
663
views
3 answers
0 votes
Int A[3]={0,1,2}A++; For this code snippet un C will there be a compilation error,if yes then please explain a bit.
#1144
677
views
1 answers
0 votes
#include<stdio.h>#define funct(x) x*x+xint main(){ int x; x=36+funct(5)+funct(3); printf("%d",x); return 0;}
#1145
3.0k
views
1 answers
1 votes
#include<stdio.h>int main(){ int a; char *x; x = (char *) &a; a = 512; x[0] = 1; x[1] = 2; printf("%dn",a); return 0;}
#1146
589
views
3 answers
0 votes
How many times will the loop execute?What is the general expression in terms of 'n'?for( i=1; i<=n; i=i*3) { for( j=i; j<=n; j++) { printf ( "ravi"); }}
#1147
298
views
1 answers
0 votes
what is the output of the program? void main() { static char x=1; if(!x ... EOF|EOF&EOF))); } (A) -1 IS IT GOOD (B) 1 IS IT GOOD (C) 0 IS IT GOOD
#1148
386
views
2 answers
0 votes
#include<iostream>using namespace std;int main(){ int a[] = {10,20,30,40,50}; cout<<(*(&a+1)-a); return 0;}how th o/p is 5 ??
#1149
677
views
0 answers
0 votes
The number of different directed trees with 3 nodes areA) 3B) 4C) 5D) 6I think the answer is 5 but the answer is not.
#1150
246
views
0 answers
0 votes
int add(int a){ return a;}int sub(int b){ return b;}void main (){Int (*fun[])(int)={add,sub};printf("%d %d %d",&add,&fun[0],&sub);} address of add is ... is 667 but output is 657 -14 667 ...now my question is why it is not 657 657 667
#1151
2.8k
views
1 answers
3 votes
Let T be a binary search tree with n nodes and Sn be the average number of comparisons required for successful search and Un be the average number of comparison ... for an unsuccessful search. Then what is the relation between Sn, Un and n
#1152
506
views
1 answers
2 votes
#include <stdio.h> void f(char**); int main() { char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl" }; f(argv); return 0; } void f(char **p) { char *t; t ... (d) gh
#1153
277
views
1 answers
0 votes
printf("The ASCII value of %c = %d\n",i,i); what is the meaning of this line why i,i written in the code.
#1154
352
views
1 answers
0 votes
#1155
211
views
1 answers
0 votes
#1156
314
views
2 answers
1 votes
Shouldn't the answer be r,7? Its given r,4.
#1157
353
views
2 answers
0 votes
#1158
213
views
1 answers
1 votes
What is the following function doing? unsigned fun(unsigned a, unsigned b) { int i; unsigned j = 0; for(i = 0; i < 32; i++) { j <<= 1; j += !!(a & 0x80000000); a <<= 1; if(j >=b) { j -= b; a++; } } return a; }
#1159
167
views
0 answers
0 votes
What is the following function doing? unsigned fun(unsigned int a) { unsigned int i, x = 0, y = 0, z = 0; for(i = 0; i < 16; i++) { y <<= 2; y + ... z++; y-=x; } } return z; }
#1160
628
views
1 answers
2 votes
case : 'AB' is it valid to write multiple characters in single quotes?And if valid does ASCII value of a& b gets added and stored as integral constant?Thanks