0 votes
339 views
in C program by (1.7k points)
edited

 Create a simple code fragment that will swap the values of two variables num1 and num2.

1 Answer

0 votes
by (1.7k points)
selected by
 
Best answer
int temp;

temp = num1;

num1 = num2;

num2 = temp;

 

Related questions

0 votes
1 answer 356 views
0 votes
1 answer 779 views
0 votes
1 answer 390 views
asked Jun 11, 2022 in Python by Doubtly (98.9k points)
0 votes
1 answer 446 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

Recent Badges

Doubtly Earned a badge
Doubtly Earned a badge
MrRam Earned a badge

5.7k questions

5.1k answers

108 comments

649 users

...