It is very odd code indeed. It shows little understanding of C in an embedded situation
What is:-
#include <STDIO.h>
Doing here! Do you need it? It takes up gobs of resource for no use at all.
You also make a lot of use of the String variables why?
What do you expect String outtput[4]; to declare?
Then you are declaring inputs to functions without the variable type:-
String BinaryFunc (outtput)
Then you are using the array pin without ever having declared it.
Is your C language instructor a fake that he can not spot any of this?