Step 1: Recall the one rule a function must obey.
For something to be a function from $Z$ to $Z$, each first value (input) is allowed only one second value (output). If one input can give two different outputs, it fails.
Step 2: Test option (A), the set of $(ab,\ a+b)$.
Pick $ab = 6$. With $a=2, b=3$ the output is $a+b=5$. With $a=1, b=6$ the output is $a+b=7$. Same input $6$ gives two outputs. Not a function.
Step 3: Test option (B), the set of $(a+b,\ a-b)$.
Pick $a+b = 4$. With $a=2, b=2$ we get $a-b=0$. With $a=3, b=1$ we get $a-b=2$. Same input, two outputs. Not a function.
Step 4: Test option (D), the set of $(a^2 b^2,\ ab)$.
Pick $a^2 b^2 = 4$. With $a=1, b=2$ we get $ab=2$. With $a=1, b=-2$ we get $ab=-2$. Same input gives different outputs. Not a function.
Step 5: Test option (C), the set of $(ab,\ a^2 b^2)$.
Here the output is $a^2 b^2 = (ab)^2$. So once the input $ab$ is fixed, the output is simply its square, which is one fixed value.
Step 6: Confirm uniqueness for (C).
Whatever pair gives the same $ab$, the output $(ab)^2$ is the same number every time. So each input has exactly one output. This is a genuine function. \[ \boxed{f=\{(ab,\ a^2b^2): a,b\in Z\}} \]