Well I managed using integers, but the teacher wants to accept code that is too large that does not fit in the integer, it said it had to read as a string, but I do not know how this can be done. >
My code using integers
#include <stdio.h>
int main(int argc, char** argv)
{
int num, aux, vetor[90], i = 0;
scanf("%d", &num);
while(num >= 1)
{
aux = num;
num = num / 2;
aux = aux % 2;
vetor[i++] = aux;
}
for(int j = i - 1; j >= 0; j--)
{
printf("%d", vetor[j]);
}
putchar('\n');
return 0;
}