Computer Science and Information Technology
2025 · Paper 2
Take it one question at a time. Try an answer, then check your understanding.
Complete GATE CSE 2025 Paper 2 overview, original pages and practice · Timed previous-paper practice
Questions 19–21 of 65. Imported answers require review unless explicitly marked reviewed.
Question 19
Open questionCSMCQ1 markNeeds review
Consider the following C program:
#include <stdio.h>
void strcpy(char *, char *);
int main(){
char a[30] = "@#Hello World!";
strcpy(a, a + 2);
printf("%s\n", a);
return 0;
}
void strcpy(char *s, char *t) {
while(*t)
*s++ = *t++;
}
Which ONE of the following will be the output of the program?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 20
Open questionCSMCQ1 markNeeds review
Consider an unordered list of
distinct integers.What is the minimum number of element comparisons required to find an integer in the list that is NOT the largest in the list?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 21
Open questionCSMCQ1 markNeeds review
Consider the following statements about the use of backpatching in a compiler for intermediate code generation:
(I) Backpatching can be used to generate code for Boolean expression in one pass.
(II) Backpatching can be used to generate code for flow-of-control statements in one pass.
Which ONE of the following options is CORRECT?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer