Question


Which of the following code segments does not contain any errors?
(a)
void printnum (int x)
{
print("%i", x);
return x;
}
(b)
int cube(int s)
{
int s;
return (s * s * s);
}
(c)
double triple(float n) {
return (3 * n);
}
(d)
double circumference (int r)
return (3.14 * 2 * r);

Answer

This answer is hidden. It contains 3 characters.