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

#1061
200
views
0 answers
0 votes
#1062
265
views
0 answers
0 votes
Bit fields use for padding.It generally contained integer bits(signed and unsigned). But it cannot contain addresses. Does it mean bit field cannot contain a ... a pointer, how bit field cannot contain a pointer?Are these not contradictory?
#1063
680
views
0 answers
0 votes
Something wrong with the code or is it working fine ?
#1064
351
views
1 answers
0 votes
#1065
495
views
0 answers
0 votes
https://gatecse.in/data_types_operators_in_c/ Q7. #include <stdio.h>int main(){ char *p = "Hello World"; char q[] = "Hello World"; printf("%zd %zd", ... ? What will sizeof *p and sizeof *q give?I am getting the output as 4 112 1
#1066
1.3k
views
0 answers
1 votes
#include <stdio.h>main(){ int arr[5]; printf("%p,%p\n",arr,&arr);}How do both print the same address?
#1067
398
views
0 answers
2 votes
We know range of signed char -128 to 127. But in the given code answer is 1200. So, here we should get an overflow.Integer Promotion occurs which prevents to cause it overflow. How ... d = (a * b) / c; printf ("%d ", d); return 0; }
#1068
174
views
0 answers
0 votes
#1069
680
views
1 answers
0 votes
The answer for this is given as 4100
#1070
579
views
1 answers
0 votes
Lines from Dennis Ritchie1)The variables named in a structure are called members. A structure member or tag and an ordinary (i.e., non-member) ... p1 and also incrementing valueHow copying and incrementing done same time in structures?
#1071
1.1k
views
0 answers
2 votes
Q. What is the output of following program?int main(){ register int Data =10; int *piSumData = NULL; piSumData = &Data; *piSumData = 5; printf("%d",*piSumData); }1. Run time error2. garbage value3. 104. 5
#1072
618
views
1 answers
1 votes
#include <stdio.h> int main() { long int a = 0x7fffffff * 0x7fffffff; long int b = 0x7fffffff * 0x7fffffffl; printf("a = %ld, b = %ld\n", a, b); return 0; }What will be output if sizeof(int) is 4 and sizeof(long int) is 8.
#1073
500
views
0 answers
0 votes
I want to derive a formula that, with n nodes how many AVL trees can possible.we know that, with 0 ==> 1,with 1 ==> 1, with 2 ==> 2, with 3 ==> ... right nodes atmost differ by 1.Can we simplify further.... i am not able to do further...
#1074
278
views
1 answers
0 votes
int P=O;for(i=0;i<2n;i++){For(j=1;j<=n;j++){ If(j<i)P=P+1;}}Printf("%d",P);What is the output in terms of n:a. (4n^2-n)/2b. (3n^2-n)/2c. (n^2-4n)/2d.(n^2-3n)/2
#1075
568
views
1 answers
0 votes
What is a variable pointer? please note the question is not asking about pointer variables, but the specific term.
#1076
352
views
0 answers
0 votes
What is the output of this code in c?int main(){static int a[][2][3]={0,1,2,3,4,5,6,7,8,9,10,11,12};int i=-1;int d;d=a[i++][++i][++i]; printf("%d",d); return 0;} how did 2 come as the answer? please explain,thanks.
#1077
645
views
1 answers
5 votes
How will this function run for the input 123 (where str points '123' and n=3)?in myAtoiRec(int *str,int n) { if(n==1) return*str-'0'; return(10*myAtoiRec(str,n-1)+str[n-1]-'0'); }
#1078
896
views
0 answers
0 votes
Function to reverse the circular doubly linked list.Why is this function showing an error?head is a global variable.void reverse() { struct node *z; struct node *t = head -> ... back; t->back=t->forw; t->forw=z; head=t->forw; }
#1080
200
views
0 answers
0 votes
Since in a machine we always store numbers in binary then why can't we directly print the binary number itself using any inbuilt function, why do we have to write a separate code for it every time?