Consider the following C program:
Which ONE of the following will be the output of the program?
c
- A@#Hello World!
- BHello World!
- Cello World!
- DHello World!d!
Programming in CPointers, Multi-Dimensional Arrays, StructuresMCQ1 mark · −1/3 if wrongMedium
1#include <stdio.h>
2void stringcopy(char *, char *);
3int main( ) {
4 char a[30] = "@#Hello World!";
5 stringcopy(a, a + 2);
6 printf("%s\n", a);
7 return 0;
8}
9void stringcopy(char *s, char *t) {
10 while(*t)
11 *s++ = *t++;
12}
13A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.