Same logic on int and char

I was trying it without array and just char and int.but I’m unable to get the same response
int i=10;
char c = i + ‘0’;
cout<<c;
why am I not getting 10?

Got the logic. I was using 2 digits. and char takes 1 digit. Can’t delete this post :frowning:

ok just mark problem resolved