71. Implement Custom strcpy function

In C, the strcpy() function copies a null-terminated string from source to destination.

Your task is to implement a custom version of strcpy() that copies one string into another without using built-in functions.

You will be given:

  • A source string src
  • A destination buffer dest[101] (you must copy into it)

Ensure the destination is null-terminated, just like standard strcpy.

 

Example-1

Input: "firmware"
Output: firmware


Example-2

Input: "abc 123"
Output: abc 123


Example-3

Input: ""
Output: ``


 

Loading...

Input

firmware

Expected Output

firmware