Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » Forum » x-Forum » Question

reverse Function in C prog-CppBuzz-Forum

Hi i facing with this exercice can anyone explained how to write this in C programming : 

Exercice : 

-----------------------------

Write a function reverse that receives an integer n as a parameter and returns that integer as result backwards. For example, if n = 123456, the function returns 654321. 

For that, it will be necessary to use the division and the modulo. Reminder: 153% 10 = 3 and 153/10 = 15.

Remember to handle the case n < 0. 

-----------------------------------
I hope got answer from u guys.

Thank u in advanced.

Posted by Cstudents 2021-02-12 14:41:02

No Ans Posted

Please login to comment

Log In


Ask New Question