google search

Popular Posts


Welcome to BCA Notes

>>>>>>>>>>>>>>>>

Visitors

Search This Blog

Blogger templates

Visitor Map


Tuesday, 15 April 2014

reverse of a string without using string functions

#include<stdio.h>
#include<conio.h>
#include<iostream.h>
main()
{
char str[50];
int i;
clrscr();
cout<<"\n"<<"Enter a String: ";
cin.getline(str,50);
cout<<"\n"<<str<<"\n";
for(i=0;str[i]!='\0';i++);
cout<<"\nLength of String :"<<i;
for(;i!=-1;i--)
{
cout<<str[i];
}


getch();
}

0 comments:

Post a Comment