Source Code:-
-----------------------------------------------------------------------------------------------------------
#include<iostream>
using namespace std;
#include<stdio.h>
#include<string.h>
int main()
{
char str[100],temp;
int i,j=0;
cout<<"Enter the string that you want to reverse:";
gets(str); // gets function for input string
i=0;
j=strlen(str)-1;
while(i<j)
{
temp=str[i];
str[i]=str[j];
str[j]=temp;
i++;
j--;
}
cout<<" The Reverse string is: "<<str;
}
--------------------------------------------------------------------------------
Out Put-
Subscribe to:
Post Comments (Atom)
Hardware/System Requirements for the Ubuntu 18.04 LTS.
According to the official Website of Ubuntu minimum system requirements to install Ubuntu 18.04 LTS are:- 2 GHz dual core processor or...
-
According to the official Website of Ubuntu minimum system requirements to install Ubuntu 18.04 LTS are:- 2 GHz dual core processor or...
-
Cloud Computing with Azure Cloud Computing With Azure( Event organized by CSIT Association Nepal And WSC Nepal In CAB) June-0...
No comments:
Post a Comment