0
Please anyone tel me how to swap a 10 digit number in C programming.
2 Answers
+ 3
Debi prasad Das
plz use the search bar before asking any questions and first complete the lessons with carefully..
https://www.geeksforgeeks.org/largest-number-with-one-swap-allowed/amp/
https://stackoverflow.com/questions/45125820/swapping-some-digits-of-a-number-in-c-programming
+ 2
Do you mean swap two 10-digit numbers, or reverse one 10-digit number (swap end for end)?
An easy way to reverse a number: read the number as a string and reverse the string by looping from the end to the beginning as you print it. If you use this method, then negative numbers require special handling.
There are a few ways to swap two numbers. The simplest way involves using a third variable as a temporary holding place.