0

how can I convert an integer into a character in c++??

16th Jul 2016, 4:21 AM
frizern
frizern - avatar
2 Réponses
0
using static_cast you can convert a the data type of data
16th Jul 2016, 4:26 AM
aditya ronanki
aditya ronanki - avatar
0
.... int i,tmp,j; char c[100]; .....//input i j=0; while (i){ tmp=i%10; i/=10; c [j++]=tmp+48; } for (i=0;j>=0;i++,j--) { tmp=c [i]; c [i]=c[j]; c [j]=tmp; } c [i]='\0'; ......
16th Jul 2016, 5:24 AM
Mukul Kumar
Mukul Kumar - avatar