GATEverse Practice, past papers & mock tests
GATE 2025 · CS2 - Afternoon
Programming & Data StructuresProgrammingmediumMCQ1 mark
Consider the following C program:
c
#include <stdio.h>
void stringcopy(char *, char *);
int main(){
  char a[30] = "@#Hello World!";
  stringcopy(a, a + 2);
  printf("%s\n", a);
  return 0;
}
void stringcopy(char *s, char *t) {
  while(*t)
    *s++ = *t++;
}
Which ONE of the following will be the output of the program?
Save your progress

Related Programming & Data Structures PYQs