int is being converted to char
lets get an example, you have 32, the rest of the division of 32 by 10 -> 2 so you write 2+'0' in the array. you divide by ten and n==3, the rest of the division of 3 by 10 is 3, you write 3+'0' in the array, then divide by ten, n==0 you are done
you must stop reading theory and start trying code with an IDE and a compiler, otherwise you wont learn c/c++, only c/c++ theory
It's easy, first do block is executed then the while condition is check, if it evaluates to true.. do block is executed again, then while condition is checked, if true then do block executes.. You get the idea
Обсуждают сегодня