Print reverse problem

How do I solve this one without using long long int type ?

Input it as string and print it in reverse order

Suppose the input is in integer type… we can store only integers within the 32 bit signed integer range…

N can be 10^9 at max so u can stroe it in int 32bit
Now say num is n
then print n%10 and do n/10 until n becomes 0 ,this way u will be able to print it in reverse order

Suppose n is 1234567892 then reverse of it will be more than the INT_MAX value, so i guess it will overflow…

You have to print reverse not save it

I am not asking particularly for this question, i am actually asking in general for the given conditions that i stated…

So you are asking
Given an int of max size 32 bit
How to reverse it without using long long int
and save it in 32 bit integer only ?
Please properly formulate your question so that I can answer

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.