#include<stdio.h>
void main()
{
char n[]="hello";
char *p=&n[0];
char *temp=&n[0];
clrscr();
while(*p!='\0')
{ p++;
}
p--;
printf("Reverse of String:\n");
while(temp<=p)
{
printf("%c",*p);
p--;
}
getch();
}
void main()
{
char n[]="hello";
char *p=&n[0];
char *temp=&n[0];
clrscr();
while(*p!='\0')
{ p++;
}
p--;
printf("Reverse of String:\n");
while(temp<=p)
{
printf("%c",*p);
p--;
}
getch();
}
No comments:
Post a Comment