if the whole a is converted, not a single character, can be changed to, hopefully help you:
#include
#include
int main()
{
char a[100];
gets(a)
for (int i = 0; i <= strlen(a); i++) {
if (a[i] != '\0') {
if (a[i] >= 'A' && a[i] <= 'Z') {
a[i] = strlwr(a[i]);
} else if (a[i] >= 'a' && a[i] <= 'z'){
a[i] = strupr(a[i]);
}
}
}
for (int i = 0; i <= strlen(a); i++) {
if (a[i] != '\0') {
printf("%c", a[i]);
}
}
return 0;
}