Create a program that transforms the characters read from the standard input so that it changes the capitalization of the letters (from lowercase to uppercase and vice versa) but keeps any other characters unchanged (repeated in the output as they are).
The input contains ASCII characters only.
The output must contain exactly the same number of characters as the input.
Output for Sample Input
Hints and Guide
In this exercise, the length of the input is not specified, but we can do the conversion character by character.
Remember that processing the input character by character could be very slow, thus, instead of the use of the getchar function, it is recommended to use the fgets function with a buffer.
One possible solution is available in: main.c.
Acknowledgement This work was supported by the construction EFOP-3.4.3-16-2016-00021. The project was supported by the European Union, co-financed by the European Social Fund.
|University of Debrecen; Faculty of Informatics; v. 03/01/2019|