Write a C program to Swap Two Numbers using Temporary or Third Variable || C Programming Tutorials

Опубликовано: 15 Октябрь 2024
на канале: Learning and Teaching Coding
130
7

‪@LearningandTeachingCoding07‬

In this tutorial program, the temp variable is assigned the value of the first variable. (temp = n1 )

Then, the value of the first variable is assigned to the second variable. (n1 = n2)

Finally, the temp (which holds the initial value of first) is assigned to second. (n2 = temp)

This completes the swapping process.

#LearningandTeachingCoding
#CProgrammingTutorials
#CPrograms