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

#1281
1.1k
views
0 answers
0 votes
Can someone explain why this is happening. I have found post increment has higher precedence than pre-increment . And Post increment is left ... has differenet value.https://www.geeksforgeeks.org/c-operator-precedence-associativity/
#1282
308
views
1 answers
1 votes
A hash table is used when number of keys actually stored it any point of time is small as compared to the number of possible keys.please explain this line with suitable example.
#1283
1.9k
views
0 answers
1 votes
In implementation of queue using stack, deletion of second element from front take Ο(n) time, when insertion take Ο(1) time.Is it a true statement ?Well it can ... is empty then error 2) Pop an item from stack1 and return itAm i right?
#1284
812
views
1 answers
1 votes
Please tell me about all the variations of these above types of questions that can be asked?
#1285
221
views
0 answers
1 votes
Which of the following represents the number of additions performed by above code?A 8000B 4000C 4020D 28420Solution:- Well i got the Answer but not exact answer :- ... So total = 17000 But sill its far away from actual answer which is D
#1286
215
views
0 answers
0 votes
Any AVL tree of height h+1 contains strictly more nodes than any AVL tree of height h. ?Its a false statement right ? what is the correct statement then , ... of height h+1 contains strictly lesser nodes than any AVL tree of height h. ?
#1287
795
views
2 answers
1 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 = (p += sizeof(int))[-1];printf("%s\n", t);}can anyone explain this program?
#1288
681
views
3 answers
2 votes
what will be output printed?
#1289
609
views
0 answers
0 votes
In DFS traversal every vertex of the graph is visited exactly once.?Is it correct ?According to me its True because in standard algorithm we maintain a visited ... if found again hence one vertex will never get visited again isn't it?
#1290
288
views
1 answers
0 votes
Suppose i delete the root element from the heap then i will apply the heapify() procedure on root,and suppose if i delete a random element form heap ... strategy we will find the minimum number of swaps or comparison required isnt it?
#1291
305
views
1 answers
1 votes
#include<stdio.h>main(){int a[][3] = {1, 2, 3, 4, 5, 6};int (*ptr)[3] = a;printf("%d %d ", (*ptr)[1], (*ptr)[2]);++ptr;printf("%d %d\n", (*ptr)[1], (*ptr)[2]);return 0;}explain this program?
#1292
2.2k
views
3 answers
1 votes
#include<stdio.h>int main(){ char *s[] = {"ice","green","cone","please"}; char **ptr[] = {s+3,s+2,s+1,s}; char ***p = ptr; printf ... p[-1][-1] + 1); return 0;}Please anyone explain this especially last printf statement.
#1293
450
views
0 answers
0 votes
What is the output.My doubt is : What is meant by call by copy restore ? is it same as call by reference or there is some difference ?
#1294
183
views
0 answers
0 votes
Consider a part of program:int i=4,t; t=i++ + i++ + i++; printf("%d",t);Why the value of t comes out to be 15(in codeblocks)?Since we have post increment so ... printf("%d",t);Its output must be 5+5+5=15 but it comes out to be 17 Why?
#1295
1.3k
views
4 answers
1 votes
#include<stdio.h>int main(){ if(*"abc" ==*"abcdef") printf("strings are equal"); else printf("not equal"); return;}Can someone please explain this program as output is strings are equal?
#1296
2.6k
views
1 answers
0 votes
Main (){Int x,y , z;X=y=z=1;Z=++x||++y&&++z;Printf ("x=%d y=%d z=%d",x,y,z);}
#1297
314
views
1 answers
0 votes
What is the running time of the function?Int function(int n) {If(n<=1)return;For(int i=1;i<n;i++);For(int j=0;j<3;j++);Function (n-1);
#1298
10.2k
views
2 answers
2 votes
main(){if(fork()>0)sleep(100);}The given code results in the creation of:I) an orphan processII) a zombie processIII) a process that executes foreverIV) None of these Can someone explain this?
#1299
558
views
2 answers
0 votes
#include<stdio.h> main() { static int a=1; ++a; printf("%d",a); if(a<=3) main(); printf("%d",a); }output: $234444$i m not getting how extra two 4 is coming?
#1300
337
views
1 answers
0 votes
#include<stdio.h> void main(){ char loop; do{ char c; printf("Enter a character: "); scanf("%c",&c); printf("ASCII value of %c is %d",c,c); printf("\nAnother test: ( ... ("\nOne more time: (0/1)?"); scanf("%d",&loop); }while(loop==1); }