Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int n,m;
- int main ()
- {
- char string[] = "aBcdEf";
- char caps[10], smalls[10]; // 10, should be changed to the max size of string
- for (int i = 0; i < strlen(string); ++i)
- {
- if (string[i]>'Z')
- smalls[n++] = string[i];
- else
- caps[m++] = string[i];
- }
- smalls[n] = caps[m] = '\0';
- printf("%s :: %s :: %s", string, smalls, caps);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement