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

#1181
713
views
2 answers
1 votes
Int main(){unsigned int x[4][3]={{1,2,3},{4,5,6},{7,8,9},{10,11,12}}Printf("%u%u%u",x+3,*(x+3),*(x+2)+3);}Assume ... location .why not value which present at that location.and please suggest some good source to learn about this concept
#1182
502
views
2 answers
0 votes
int f(int n){static int r=0;if(n<=0)return 1 ;if (n>3){r=n;return f(n-2) +2;}return f(n-1)+r;}What is the value of f(5)? Kindly explain how the recursion is working here along with the solution.
#1183
862
views
1 answers
0 votes
Consider a C Program situation like this, main() { float a=2.23564; printf("%d",a); }Then what will be the output??please help me..
#1184
342
views
1 answers
0 votes
#include<stdio.h> void main() { int i; printf("%d", scanf("%d",&i)); //provide input as 100; }
#1185
386
views
1 answers
0 votes
How radix sort considered to be an application of linked list? Tell me clearly
#1186
2.1k
views
2 answers
2 votes
int f (int n){ if (n==0) return 0; if(n==1) return 1;elsereturn f(n-1)+f(n-2);}Find the upper bound and lower bound to the number of function calls for input size 'n'?
#1187
1.1k
views
1 answers
1 votes
void ab() { auto int a; static int s= 5; a = ++s; printf("%d%d",a,s); if(a<= 7) ab(); printf("%d%d",a,s); } void main() { ab(); }According to me answer should be- 667788887766 but the answer is - 667788887868. Please explain
#1188
541
views
0 answers
0 votes
Consider the following C program.#include <stdio.h> #include <string.h> void printlength (char *s, char *t) { unsigned int c = 0; int len = ((strlen (s) ... a value of type size_t, which is an unsigned int .The output of the program is
#1189
1.4k
views
2 answers
0 votes
Main(){Int a[3][4]={(1,2,3,4),(5,6,7,8),(9,10,11,12)}Print("\n%u%u%u",a[0]+1,*(a[0]+1),*(*(a+0)+1)));}What will be the output if base address is 10.
#1190
2.0k
views
1 answers
0 votes
consider the 2 dimensional array. A [-8...12,-4...16]. Calculate the address of A[1,3]. Assume row major and each element occupies 4-bytes, starting address 2000
#1191
637
views
2 answers
0 votes
To construct binary search tree either from preorder or postorder what is the efficient time complexity ?can we construct unique BST along with post and preorder ?Then what is the significance of using PRE+INORDER or POST+INORDER
#1192
298
views
1 answers
0 votes
#1193
963
views
1 answers
0 votes
https://gateoverflow.in/39667/gate2016-1-10in this question we are using array so both operations are taking constant only becz of in array random access is possible so dequeue will take O(1) .....??? Is this the reason for dequeue????
#1194
755
views
2 answers
0 votes
i am getting 4,3,4,3,8,2 is it right?????
#1195
3.8k
views
1 answers
1 votes
What will be the output of the program ?#include<stdio.h> int main() { union a { int i; char ch[2]; }; union a u; u.ch[0]=3; u.ch[1]=2; printf("%d, ... 515B.515, 2, 3C.3, 2, 5D.515, 515, 4Please Explain how to do such Questions On Union...
#1196
277
views
1 answers
0 votes
What is the Output of Following Program Snippet ?#include <stdio.h> struct Key{ int X; char P; };int main(){ struct Key Values[] = {10,'A',20,'B',30,'C',40,'D'}; printf("%d",sizeof(Values));}Explain your Answer ..
#1197
363
views
0 answers
0 votes
What is the value of p and q at the end?#include<stdio.h>int main(){ int n=1024; int p=0,q=0; int i,j; for( i = 1;i<=n;i=2*i) p=p+5; ... ;j<=p;j=2*j) q=q+7; printf(" %d\n %d\n",p,q); }Please explain briefly.
#1198
544
views
2 answers
1 votes
13. What does the error "Null Pointer Assignment" mean and what causes this error?
#1199
721
views
1 answers
0 votes
6. Would the following program compile?main( ) { int a = 10, *j; void *k; j = k = &a; j++ ; k++; printf ("\n %u %u", j, k ) ; }Please explain above program with some examples..
#1200
874
views
1 answers
1 votes
(5) Would the following program give a compilation error or warning?main() { float i = 10, *j; void *k; k=&i; j= k; printf("\n%f", *j); }