Program 1 :
#include#include #include void main() { char *string = "Pritesh Taral"; printf("String before to strlwr : %sn", string); strlwr(string); printf("String after strlwr : %sn", string); getch(); }
Output :
String before to strlwr : Pritesh Taral String after strlwr : pritesh taral
Program 2 :
#include#include #include void main() { char string[100]; printf("Enter String : "); gets(string); strlwr(string); printf("String after strlwr : %sn", string); getch(); }
Output :
Enter String : Pritesh Taral String after strlwr : pritesh taral
Explain me ?
- strlwr : Converts all Letters from given String into equivalent Lowercase Letters
- strlwr functions is included in Header File : string.h
No comments:
Post a Comment