Learn basic concept of c , c++ and python programming in regularcodes.com

Spread the post

Program to reverse a number in c

Write an efficient algorithm to Reverse a given integer number. Note that it's possible the given integer value are negative and positive.

For example.

Program to reverse a number in c without using loop. Time complexity O(n).

Output

View process.

Stack Areamainresult (int) =5432reverse_noresult(pointer)value (int) =1234reverse_noresult(pointer)value (int) =123reverse_noresult(pointer)value (int) =12reverse_noresult(pointer)value (int) =1

View steps of execution

Submit your solution in comment section.

Spread the post

Recommended Posts: