1.

Strrev() फंक्शन क्या करता है?

Answer»

The strrev() function is USED to REVERSE the given string in C language.

Step-by-step EXPLANATION:

The strrev() function is used to reverse the given string in C language.

Syntax for strrev( ) function:  char *strrev(char *string);

EXAMPLE PROGRAM FOR STRREV() FUNCTION IN C:

In this bellow  program, string “Hello” is reversed USING strrev( ) function and output is DISPLAYED as “olleH”.

#include

#include

int main()

{

  char name[30] = "Hello";

  printf("String before strrev( ) : %s\n",name);

  printf("String after strrev( )  : %s",strrev(name));

  return 0;

}

OUTPUT:

String before strrev( ) : Hello

String after strrev( )     : olleH



Discussion

No Comment Found