A string is input which is both in uppercase & lowercase letters. How can I arrange the string so that all lowercase letters are in one side and uppercase letters are in another side.
Somali Rathore 0 Newbie Poster
Recommended Answers
Jump to Post— Freaky_Chris 299For basic ASCII which I presume you will be using, then you can just check the character range. and swap accordingly. IE, 65-90 is capital etc
Chris
Jump to Post— Freaky_Chris 299You can do it in one array
char array[3] = {'a', 'C', 'b'}; char temp; temp = array[2]; array[2] = array[1]; array[1] = temp;Chris
All 7 Replies
Freaky_Chris 299 Master Poster
ajay.krish123 -4 Junior Poster in Training
Somali Rathore 0 Newbie Poster
Freaky_Chris 299 Master Poster
ajay.krish123 -4 Junior Poster in Training
Freaky_Chris 299 Master Poster
Aia 1,977 Nearly a Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.