Q1
Select the option with the correct sequence of articles to fill in the blanks.
Show answer without attempting
Answer: A
GATE CS · 1 February 2025 · Slot 1 · 65 questions
Every question from the GATE CS 2025 CS-1 paper held on 1 February 2025, in the order it was printed, with the official answer key. Pick an option, or type the number for numerical-answer questions, and it is marked straight away with GATE marking: 1 or 2 marks, −⅓ or −⅔ for a wrong MCQ, no negative marks for MSQ and NAT.
Answer: A
Answer: B
Answer: C
Answer: A

Answer: C
Answer: C

Answer: A
Answer: A

Answer: A
Answer: B
Answer: A
Answer: C
Answer: B
Answer: A
Answer: C
Answer: B
Answer: D
Answer: B
Answer: A
Answer: A

Answer: B, D
Answer: B, D
Answer: A, D
Answer: B, D
Answer: B, D
Answer: A, B

Answer: A, B, C
Answer: D
int main()
{
int x=0,i=0;
scanf("%d",&x);
for(i=0; i<20; i++)
{
x = x+20;
printf("%d
",x);
}
return 0;
}Answer: 21
Answer: 195
Answer: -2.1 to -1.9
Answer: 0.49 to 0.51
fun(int A[0,\dots,n-1]){
for i=0 to n-2
for j=0 to n-i-2
if (A[j]>A[j+1])
then swap A[j] and A[j+1]
}Answer: 435
#include <stdio.h>
void foo(int *p, int x){
*p=x;
}
int main(){
int *z;
int a = 20, b = 25;
z = &a;
foo(z,b);
printf("%d",a);
return 0;
}Answer: 25
Answer: 5
Answer: A
ADD R1, #25 // R1 = R1 + 25Answer: B
Answer: A
Answer: A

Answer: A
Answer: D
Answer: A
Answer: C
Answer: C
Answer: C
Answer: A, D
Answer: B, C
Answer: B, D
Answer: B

Answer: C
Answer: 65468
1001: i = 1
1002: j = 1
1003: t1 = 10*i
1004: t2 = t1+j
1005: t3 = 8*t2
1006: t4 = t3-88
1007: a[t4] = 0.0
1008: j = j+1
1009: if j <= 10 goto 1003
1010: i = i+1
1011: if i <= 10 goto 1002
1012: i = 1
1013: t5 = i-1
1014: t6 = 88*t5
1015: a[t6] = 1.0
1016: i = i+1
1017: if i <= 10 goto 1013Answer: 6

Answer: 11.83 to 11.87
Answer: 6
player(pid,pname,age)
coach(cid,cname)
team(tid,tname,city,cid)
members(pid,tid)SELECT MIN(P.age)
FROM player P
WHERE P.pid IN (
SELECT M.pid
FROM team T, coach C, members M
WHERE C.cname = 'Mark'
AND T.cid = C.cid
AND M.tid = T.tid
)
Answer: 26
Answer: 0.949 to 0.952

Answer: 7
Answer: 0.300 to 0.302

Answer: 5

Answer: 7 to 8
#include <stdio.h>
int foo(int S[],int size){
if(size == 0) return 0;
if(size == 1) return 1;
if(S[0] != S[1]) return 1+foo(S+1,size-1);
return foo(S+1,size-1);
}
int main(){
int A[]={0,1,2,2,2,0,0,1,1};
printf("%d",foo(A,9));
return 0;
}Answer: 5
typedef struct list {
int data;
struct list *next;
} LIST;int find (int query, LIST *list) {
while (list != NULL){
if(list->data == query) return 1;
list = list->next;
}
return 0;
}
int main () {
ptr1=L1; ptr2=L2;
while (ptr1->next != NULL){
query = ptr1->next->data;
if (find (query, L2))
ptr1->next = ptr1->next->next;
else ptr1 = ptr1->next;
}
return 0;
}
Answer: 5
#include <stdio.h>
int gate (int n) {
int d, t, newnum, turn;
newnum = turn = 0; t=1;
while (n>=t) t *= 10;
t /=10;
while (t>0) {
d = n/t;
n = n%t;
t /= 10;
if (turn) newnum = 10*newnum + d;
turn = (turn + 1) % 2;
}
return newnum;
}
int main () {
printf ("%d", gate(14362));
return 0;
}Answer: 46

Answer: 5
Answer: 10 to 11
0/650 correct0 marks