Let's start with the basics.
For the x86 architecture (if you use it), the char variable is stored in 1 byte, and the int variable is stored in 4 bytes.
It is IMPOSSIBLE to store the integer value random in a char variable if you do not have any compression scheme, and you know that some integer values will not occur (without random!) In your program. With no exceptions.
In your case, you want to store integers in a char array. There are four options:
1.If you want to store a random integer in this char array, then you should get a pointer to the index that you want to store the integer and pass it to the integer pointer and use it that way.
char mychars[10]; int * intlocation = (int*)(&mychar[5]); *intlocation = 3632;
Remember that this will be written in 4 bytes (4 char locations in your array), starting at the index you specified. You should always check that you are not leaving the array. You must also do the same as for getting the value when necessary.
2. If your values are between [0,255] or [-128,127], you can safely store integers in char, since these ranges can be represented using a byte. Remember that char, whether signed or unsigned, is implementation dependent. Check this!
mychars[5] = 54;
3.If your integer is just a digit, you can use the char representation of the digits.
mychars[5] = your_digit + 48; // 48 is the ascii code for '0'
4.If you want to keep the string representation of your integer, then you should use itoa() and write each char from the resulting string to your array one at a time. In this case, you should always check that you are not leaving the array.