Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2025 Set 2
Questions

Q9

MCQ1 mark, −0.33

Consider the following C program:

#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?

Sign in to save attempts.

The solution is hidden while you attempt this question. It opens once you check or show the answer.