Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<ctype.h>
- #include<string.h>
- void changeCase(char s[]);
- int main()
- {
- char a[100];
- printf("Enter a string:");
- gets(a);
- changeCase(a);
- puts(a);
- }
- void changeCase(char str[])
- {
- int i;
- for(i=0; str[i]!='\0'; i++)
- {
- if (isupper(str[i]))
- {
- str[i]=tolower(str[i]);
- }
- else if (islower(str[i]))
- {
- str[i]=tolower(str[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement