Write a C Program to Reverse a String Using Pointers
Program:
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
clrscr();
char str[100];
char *strp,l;
int i;
printf("**************************");
printf("\nwww.flintgroups.com\n");
printf("**************************\n");
printf("Enter a String\n");
gets(str);
printf("The Reversed String is : ");
l=strlen(str);
strp=&str[l];
for(i=0;i<=l;i++)
{
printf("%c",*strp);
strp--;
}
getch();
}
Output :
if u want this program in PDF format https://docs.google.com/file/d/0BzxvPSQgnviFVFZDc3Zyak5BOTQ/edit?usp=sharing
Hello, that`s my first time visit at your blogger.
ReplyDeleteNow i,m still a newbie as a blogger... in the processes of learning about the blogger..
so i try to search people blogger from google..
i hope i can learn from another blogger, how to be a good blogger and good writing...
Thanks for alr give such a wonderfull blogger...
If U Have Time Please Visit My Blog : Agen Judi Online