Reverse of String:- Q)Write a program to enter string( Character Array ) and print the reverse of string. Function used- strrev .This ...
Reverse of String:-
Q)Write a program to enter string(Character Array) and print the reverse of string.
Function used-strrev.This function is used to reverse a string.
Note:-You can also create this program in c++(c plus plus),java,c#(c sharp) languages etc. with the same logic(Functions may be differ).
Q)Write a program to enter string(Character Array) and print the reverse of string.
Function used-strrev.This function is used to reverse a string.
Note:-You can also create this program in c++(c plus plus),java,c#(c sharp) languages etc. with the same logic(Functions may be differ).
P:void main()
{
char string[40],reverse[40];
printf("Enter String");
gets(string);
strrev(string);
strcpy(reverse,string);
puts(reverse);
getch();
}
If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.
COMMENTS