0

Please anyone tel me how to swap a 10 digit number in C programming.

2nd Sep 2023, 10:43 AM
Debi prasad Das
Debi prasad Das - avatar
2 Answers
2nd Sep 2023, 11:04 AM
Darpan kesharwani🇼🇳[Inactive📚]
Darpan kesharwani🇼🇳[Inactive📚] - avatar
+ 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.
2nd Sep 2023, 3:11 PM
Brian
Brian - avatar