Is there a way to determine the size of whats stdin before I allocate for an array?
No. The reason is pretty simple: You'd have to consume the stream first. Consuming a stream may sound complex but it quiet literally just means to get the next value(s) from it. The other important characteristic of a stream is that once you've read something it's consumed and you can't "put it back" into the stream (technically it probably is possible but then it'd get really complex).
So to know how many characters there are in the standard input stream (stdin) we'd either have to count while we consume characters or we first store all characters, then count them. The problem of the first approach is that we then know how long the string would've been, but we can't get the content anymore. The problem with the latter is exactly your problem, namely that we don't know how many characters we should reserve to store the string.
Now the solution you take really depends on your problem.
F.e. if you just want to echo what the user inputted (yes, this is a real past tense of 'input'), then this can be done fairly easily like so:
char in[8];
while (fgets(in, 8, stdin))
printf("%s", in);
But if you want to store the entire string in one variable then - as you've already figured out - that's not possible with arrays, you'll need pointers for that using malloc and realloc:
size_t cur_size = 1;
char *in = NULL;
char temp[8];
while (fgets(temp, 8, stdin)) {
cur_size += 7;
char *in2 = realloc(in, cur_size);
if (!in2) {
return;
}
in = in2;
strcat(in, temp)
}