K&R Exercises

Exercise 4-14: A swap macro

Define a macro swap(t,x,y) that interchanges two arguments of type t. (Block structure will help.)

Each input line holds two integers x and y, separated by a blank. Swap them with swap(int, x, y), then print x and y, separated by a blank, on a line of its own.

Test Cases

· space→ tab↵ newline

Submissions

No submissions yet