C++ Program to display a string reversed

How to write a C++ Program to display a string reversed in C++ Programming ?

Search Results Write ac program to reverse a string - C programming  Search Results C++ Program to reverse a string C++ - How To Reverse A String How to Reverse string in c++ simple program C++ Strings - Programming Questions Write A C++ Program To Reverse A String. Reverse a string - C++  Reverse a String in C++  Display A String Backwards - C And C++ c++ - Loop to print string backwards C, C++ Program to Reverse a String without using C++ Program to display a string reversed. c++ program to reverse a string without using string functions c++ program to reverse a string using for loop c++ program to reverse a string using pointers c++ program to reverse a string using array c++ program to reverse a string using recursion c++ program to reverse a string using strrev c++ program to reverse a string using stack c++ program to reverse a string without using another array
C++ Program to display a string reversed


Solution:
//Program to display a string reversed.
#include<conio.h>
#include<iostream.h>
#include<stdio.h>

void main()
{
clrscr();
char a[80];
cout<<"Enter a string: ";
gets(a);
for(int i=0;a[i]!='\0';i++);
for(int j=i;j>=0;j--)
cout<<a[j];
getch();
}

This C++ Program to display a string reversed.


Learn More :