Write a Program for Reverse of a string

#include<stdio.h> #include<conio.h> #include < string.h > void main() { char a [20], b[20]; int i,j = 0, n...

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char a [20], b[20];
int i,j = 0, n;
printf (“\n enter string”);
gets (a);
puts (a);
n = strlen ( a);
for (i = n–1; i  >= 0; i ++)
b [j] = a [i];
j ++;
}
b [j]='\0';
printf ("\n reverse is \n”);
puts (b);
getch();
}

Related

C Programs 1142536534132980765

Post a Comment

emo-but-icon

item