#include<stdio.h>
#include<ctype.h>
int main() {
int i=0;
char in[100],mychar;
fgets(in,sizeof(in),stdin);
while (in[i]) {
mychar=in[i];
putchar (toupper(mychar));
i++;
}
return 0;
}
This is a simple program used to change a string of characters to uppercase letters. My question is that I declare the array in[100], how can I make the array number follow my input? I mean if I type 1201 characters , then the program will make the have the array that follows my input which is in[1201].