Code for Reading and writing of alphabets in reverse case in C Programming
#include <stdio.h>
#include <ctype.h>
main()
{
char alphabet;
printf("Enter an alphabet");
putchar('\n'); /* move to next line */
alphabet = getchar();
if (islower(alphabet))
putchar(toupper(alphabet));
else
putchar(tolower(alphabet));
}
Output
Enter an alphabet
a
A
Enter an alphabet
Q
q
Enter an alphabet
z
Z