Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Reverse a string.

Easy

Problem Statement

Reverse a string.

Sample Input

str = "hello"

Sample Output

olleh

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <stdio.h> #include <string.h> int main() { char str[] = "hello"; char reversed[100]; // Logic to reverse the string return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
str = "hello"
Expected Output
olleh