Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

  • Completed at: 2023-09-22T17:20:19.067Z

  • Completed languages: java

  • Tags: Fundamentals, Strings

  • Rank: 8 kyu

Description

Given a string, you have to return a string in which each character (case-sensitive) is repeated once.

Examples (Input -> Output):

* "String"      -> "SSttrriinngg"
* "Hello World" -> "HHeelllloo  WWoorrlldd"
* "1234!_ "     -> "11223344!!__  "

Good Luck!

RISC-V: The function signature is

```c
char *double_char(const char *string, char *doubled);
```

Write your result to `doubled`. You may assume it is large enough to hold the result. Return `doubled` when you are done.