//B8. Write a C Program to Reverse a String using Pointer.
#include<stdio.h>
#include<conio.h>
void main()
{
char *s;
int len,i;
clrscr();
printf("\nEnter a String:\n");
gets(s);
len=strlen(s);
printf("\nThe reverse of String is:\n");
for(i=len;i>=0;i--)
printf("%c",*(s+i));
getch();
}
Search This Blog
Wednesday, 2 March 2022
B8. Write a C Program to Reverse a String using Pointer.
Labels:
NEP_C_Programs
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment