Reformatting the String Entered to Odd then Even

My c++ teacher gave me this question.
Question:
Given a line of words (total character number is less than 100, start from odd position 1,and end with newline char ā€™\nā€™). Write a program to reformat it that new output is formed by each char from its odd position first, then its even position char.
I tried to think of a way using arrays to solve it but I don't know how to. Can anyone give a clue of the structure of this problem?
Last edited on
Topic archived. No new replies allowed.