COP 3330 FSU Exam 1 | Questions and Answers | Fall 2025/2026 Update |
100% Correct.
Correct 25
Incorrect 00
COP 3330 FSU Exam 1
25 Correct terms
Questions and answers
Term
Given the class definition:
public:
Cylinder (float length = 1, float radius = 1);
virtual ~Cylinder();
private:
,float length_, radius_;
};
Which of the following correctly declares an object variable of type
Cylinder?
a) class Cylinder c;
b) c Cylinder (2,4);
c) Cylinder c(2,4);
d) Cylinder c();
e) Cylinder c;
Give this one a try later!
Cylinder c(2,4); r1.Area() = 6
Cylinder c; r2.Area() = 1
x=2
y=3
z=4 A += 3;
x=2 std::cout << *A;
y=2
z=3
Don't know?
2 of 25
Term
, Consider the following function prototype:
void Funky (const int * a, size_t size);
and suppose your have a client program with an array declared as
follows:
int intArray[20];
a)
The call
Funky(intArray,10);
is not allowed to change the value of intArray.
b)
The call
Funky(intArray,10);
will likely result in a compile error.
c)
The call
Funky(intArray,20)
is allowed to change the value intArray[20].
d)
The call
Funky(intArray,10)
is not allowed to change the value of intArray[5].
Give this one a try later!
Date::Date (int d, int m, int y) : day_(d), Ellipse (float r1, float r2) : radius1_(r1),
month_(m), year_(y) radius2_(r2)
{ {
100% Correct.
Correct 25
Incorrect 00
COP 3330 FSU Exam 1
25 Correct terms
Questions and answers
Term
Given the class definition:
public:
Cylinder (float length = 1, float radius = 1);
virtual ~Cylinder();
private:
,float length_, radius_;
};
Which of the following correctly declares an object variable of type
Cylinder?
a) class Cylinder c;
b) c Cylinder (2,4);
c) Cylinder c(2,4);
d) Cylinder c();
e) Cylinder c;
Give this one a try later!
Cylinder c(2,4); r1.Area() = 6
Cylinder c; r2.Area() = 1
x=2
y=3
z=4 A += 3;
x=2 std::cout << *A;
y=2
z=3
Don't know?
2 of 25
Term
, Consider the following function prototype:
void Funky (const int * a, size_t size);
and suppose your have a client program with an array declared as
follows:
int intArray[20];
a)
The call
Funky(intArray,10);
is not allowed to change the value of intArray.
b)
The call
Funky(intArray,10);
will likely result in a compile error.
c)
The call
Funky(intArray,20)
is allowed to change the value intArray[20].
d)
The call
Funky(intArray,10)
is not allowed to change the value of intArray[5].
Give this one a try later!
Date::Date (int d, int m, int y) : day_(d), Ellipse (float r1, float r2) : radius1_(r1),
month_(m), year_(y) radius2_(r2)
{ {