Previous Next
0 / 23
Module DEMO-32-108DEMO-C-32

Reverse String

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program that reverses a given string in place (or produces a reversed copy) and prints the result.

Constraints

Max string length: 100

Input Format

Input:

String S

Output Format

Output:

Reversed

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
Index!7
7!xednI
Reversing Index!7 gives 7!xednI.
Sample #2
Public sample
Css!6
6!ssC
Reversing Css!6 gives 6!ssC.
Sample #3
Public sample
Sprint!7
7!tnirpS
Reversing Sprint!7 gives 7!tnirpS.
Sample #4
Public sample
Javascript.6
6.tpircsavaJ
Reversing Javascript.6 gives 6.tpircsavaJ.

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings