// 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
c programming example codes
ReplyDeletec example code for getting the disk status