2d array conversion ..help

how to convert an element of int type of an array to char type???please help
1
2
3
4
5
6
7
8
 
int arrayofints[5] = {1,2,3,4,5}; //int array
char arrayofchars[5]; //char array
int i; //just for the for loop
for(i = 0; i < 5; ++i)
{
    arrayofchars[i] = arrayofints[5] + 48; //convert the int to equivalent ascii.
}


This is where I got the conversion 'rate' of +48.

http://www.asciitable.com/

I hope I understood your question here. It was not very detailed.
thank you very very much :)...but i want to know if i can change only one element at a time and i would like it to be 'm'.
so is there a way to first decide the 2d array index ..then take that element out first ...second replace that index with 'm'.
ps:it's an 2d array of inegers.
thank you appreciate it.
Topic archived. No new replies allowed.