PROGRAM-27



// Program of reverse of string
#include
#include
#include
void main ()
{
int len,i,j;
char a[10],b;
clrscr();
printf("enter the string ");
scanf("%s",a);
len=strlen(a)-1;
for(i=len; i>=0; i--)
{
printf("%c",a[i]);
}
getch();
}





Algorithm

·                     start
·                     Declare len, i, j as integer
·                     Declare a[10] as character
·                     Write("the string ")
·                     Read(“the string”)
·                     len=strlen(a)-1
·                     for(i=len; i>=0; i--)
·                     Write(“a[i]”)
·                     Stop

#vpsinghrajput

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

1 comments: