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);
c)
double triple(float n) {
return (3 * n);
}
You might also like to view...
The ________ HTML5 element indicates tangential or supplemental content.
header b. nav c. aside d. section
________ can be created so that XML data can be viewed in a web browser
Fill in the blank(s) with correct word
Briefly describe the concept of inodes used in native Linux file systems.
What will be an ideal response?
A comparison is correct only when the correct ____ and operator are used.
A. expression B. operands C. statements D. index