So I tried to get a number(int) from the user and move the number from the integer to the empty string, and than i need to print it like a string. help?
   #include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
#define  CHAR_LENGTH 100
int main()
{
    int num =0,units=0 ,length=0,counter =0,i=0 ;
    char charNumber[CHAR_LENGTH]={0};
    printf("enter some number(positive or negative)\n");
    scanf("%d",&num);
    while (num != 0)
    {
        units =0;
        units = num %10;
        num = num / 10;
        charNumber[i]= (char)units;
        counter++;
        i++;
    }
    printf("%s",charNumber);
    return 0;
}
 
     
     
    