Академический Документы
Профессиональный Документы
Культура Документы
7. An array of structures
a) must always be declared globally
b) cannot be declared locally
c) never uses the structure name in the declaration
d) uses a variable name in the declaration.
9. char addressLine[45];
Refer to the figure above. The maximum number of characters that could be
stored in the string variable addressLine is
a) 43
b) 44
c) 45
d) unlimited.
What is the value in the variable costnum after the following statement is
executed?
costnum = cost[4];
a) 4.99
b) 25.25
c) 33.65
d) 45.99.
12. To retain its value between function calls, a local variable must be declared as
a) extern
b) persistent
c) auto
d) static.
Refer to the figure above. Which one of the following is an INVALID function
prototype to overload the function?
a) float funcB(float, int);
b) float funcB(double, float);
c) int funcB(float);
d) int funcB(short);
18. The correct syntax for a function prototype for calcSum that returns an integer
and is passed a float and an integer is
a) calcSum(int, float, int);
b) int calcSum(float, int);
c) void calcSum(float, int);
d) int calcSum(int, float);
Refer to the figure above. The output after executing the code is
a) HorshamChurch Road
b) Horsham Church Road
c) Church Road Horsham
d) Church RoadHorsham.
Refer to the figure above. The value in len after executing the code is
a) 0
b) 5
c) 6
d) 7.
30. The declaration for the constructor for a class named checkValid, which takes
two integer parameters, is
a) void checkValid(int, int);
b) int checkValid(int, int);
c) checkValid(int, int);
d) checkValid(int);
class equals
{
public:
void validate( );
};
a) declaration
b) description
c) instance
d) structure.
35. Which one of the following lines of code will cause a syntax error?
a) num = ++count1;
b) int a=195, b=2;
c) float x=10.56, y =5.75;
d) a = b+3+;