strrev string function in C programming language
- Home
- function in C
- strrev string function in C programming language
- On
- By
- 0 Comment
- Categories: function in C, Pre-define String function in C
strrev string function in C programming language
strrev string function in C programming language
In this tutorial, we will discuss strrev string function in C programming language
strrev() – strrev() string function in C programming language is a string library function which is used to reverses the given string.
Declaration
syntax for strrev() function is given below:
char strrev ( char *string);
parameter or arguments
String – String is given to reverse the order.
Returns
The strrev() function in C returns the given string in reverse in C Language.
Required Header
the required header for strrev() String function in C Programming language
#include<string.h>
Example
In the program, Te string “Hello world” is reversed using strrev() function and output given below
Program 1
#include <stdio.h> #include <stdlib.h> int main() { char name[]="Hello world"; printf("Reverse this string :%s\n",strrev(name)); getch(); return 0; }
When above program me is compiled it will produce the following result
Reverse this string :dlrow olleh
There are other C programming language functions that are similar to the this function
Suggested for you
String function in C Language
String handling in C language
Arithmetic function in C language
User-defined functions in C language