Skip to content

Latest commit

 

History

History
55 lines (32 loc) · 1.31 KB

File metadata and controls

55 lines (32 loc) · 1.31 KB

String Reverse in C++

This project demonstrates a simple C++ program that reverses a given string. It includes a function to reverse the string and a main function to test the reversal functionality.

Features

  • String Reversal: A function that takes a string as input and returns the reversed string.
  • Simple and Efficient: Uses basic C++ constructs for efficient string manipulation.

Installation

To use this project, simply download or clone the repository:

git clone https://github.com/logusivam/stringreverse.git

Alternatively, you can directly copy the stringreverse.cpp file into your project directory.

Usage

  1. Make sure you have a C++ compiler installed (e.g., g++, clang, devcpp).

  2. Navigate to the project directory and compile the code:

g++ stringreverse.cpp -o stringreverse
  1. Run the compiled executable:
./stringreverse

Follow the on-screen instructions to input a string and see the reversed output.

Example

Here is an example of how the program works:

Enter a string: hello
Reversed string: olleh

Contributing

Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.