source file name: stringfns.C

#include<string.h>

#include<stdio.h>

int  main()

{

char s1[]="welcome to DBJ";

char s2[20];

//clrscr();

printf("\nLength=%d",strlen(s1));

printf("\n Copy string= %s",strcpy(s2,s1));

printf("\n Lower case =%s",strlwr(s1));

printf("\n Upper case =%s",strupr(s1));

printf("\n Concat string = %s",strcat("dbj","college"));

printf("\n Reverse string = %s",strrev("college"));

//getch();

return 0;

}

 

Output:

Length=14

Copy string Welcome to DBJ

Lower=welcome to dbj

Upper=WELCOME TO DBJ

Concat string =dbjcollege

Reverse string =egelloc