;

C Program to Reverse String using strrev() and using strlen() functions


Tutorialsrack 03/11/2019 C

In this C program, we will learn how to write a program to reverse a string using strrev() and using strlen() functions.

Here is the code of the program to reverse a string using strrev() and using strlen() functions.

Code - C Program to Reverse String with using strrev() and using strlen() functions
/* C Program to Reverse String with using strrev() and using strlen()*/
#include<stdio.h>
#include<string.h>
void main()
{
	char str[100];
	printf("Enter a String: ");
	gets(str);
	strrev(str);
	printf("Reverse String is = %s",str);	
}
Output

Enter a String: Tutorialsrack
Reverse String is = kcarslairotuT
--------------------------------
Process exited after 5.403 seconds with return value 33
Press any key to continue . . .


Related Posts



Comments

Recent Posts
Tags