Learn C ProgrammingLearn ProgrammingPrograms On StringsResources

081. Print string in reverse,its length,in uppercase,lowercase and copy into another string

By September 18, 2012 September 5th, 2018 No Comments
#include<stdio.h>
#include<conio.h>  
#include<string.h>
main()
{
    char *s1,*s2;
    clrscr();
    printf("Enter string : ");
    scanf("%s",s1);
    printf("Reverse String : %s",strrev(s1));
    printf("Lenght: %d",strlen(s1));
    printf("String in UPPER CASE : %s",strupr(s1));
    printf("String in lower case : %s",strlwr(s1));
    strcpy(s2,s1);
    printf("\nCopied string is...%s",s2);
    getch();
}


Leave a Reply

DEMO01