Computer Science - Object Oriented Programming Using C++

21. 

Which of the following is a valid condition for an if statement? (The condition should be both syntactically and logically valid.)

A. (age) > 65
B. (age > 0 and < 10)
C. (sales > 500 && < 800)
D. (sales > 100 && sales <= 1000)
E. (sales > 100 || sales <= 1000)

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.

22. 

A pattern for creating an object is called a(n) _____

A. class
B. attributes
C. private
D. public

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

23. 

An asterisk placed after a data type means .

A. array to
B. pointer to
C. address to
D. located to

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.

24. 

An object is a(n) _____ of a class

A. owner
B. function
C. definition
D. instance

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.

25. 

Which of the following statements creates and initializes a pointer named salesPtr?

A. salesPtr = NULL;
B. *salesPtr = "";
C. float &salesPtr = NULL;
D. float *salesPtr = "";
E. float *salesPtr = NULL;

Answer: Option E

Explanation:

No answer description available for this question. Let us discuss.