write down this code:
the thing is I don't get anything in output. debugger shows output is empty at the end of program.Code:#include <ctype.h>
#include <stdio.h>
#define N 100
void main()
{
char string[N], *output;
puts ("\nenter a char");
for (output=gets(string);*output;output++)
{
if (isalpha(*output))
{
if (islower(*output))
*output=toupper(*output);
if (isupper(*output))
*output=tolower(*output);
}
}
puts (output);
printf ("\n");
}
what did I miss?