Computer Sciences > GATE 2025 SET-2 > C Programming
Consider the following C program:
Which ONE of the following will be the output of the program?
A
#Hello World!
B
Hello World!
C
ello World!
D
Hello World!d!

Explanation

Correct : c

Correct answer:

Hello World!

Explanation:
The statement stringcopy(a, a + 2); copies the string from a + 2 (which points to Hello World! in the original array a) into a itself. Therefore, the updated string in a becomes Hello World! and printf("%s", a); outputs Hello World!.

Similar Questions

What is the worst-case time complexity of insertion in an AVL tree?
Question #23 Medium
Which operations on a binary search tree have O(h) complexity?
Question #31 Easy
Compare search complexities of sorted array vs balanced BST.
Question #47 Hard

Related Topics

Data Structures Binary Search Tree Time Complexity Algorithm Analysis Tree Algorithms Computer Science