FBLA Computer Science C++ Test



Mark the correct answer on your Scantron sheet for each of the following questions.

1. Which of the following is not an auxiliary storage device? D

a. Floppy drive b. DVD drive c. Zip drive d. Scanner

2. The smallest unit of information that can be processed by a computer is called B

a. a byte. b. a bit. c. a nano-bit. d. a micro-byte.

3. Which of the following is not an example of a system software category? B

a. Internet communication software b. Database system software c. User interface subsystem

d. Software compiler

4. Which of the following is used to convert program source code into machine language? C

a. An assembler b. A linker c. A compiler d. An interpreter

5. Which of the following statements shows the proper way to typecast a variable for a data type that contains more than one word? D

a. X = long double (value_1); b. X = (long double) value_1; c. X = (long double value_1);

d. X = (long double) (value_1);

6. Object code is A

a. machine language code produced by the compiling process. b. the actual program written in English.

c. the actual program written in C++. d. the result of the linking process.

7. C++ is a hybrid language which C

a. combines C with plusplus. b. supports C and BASIC. c. supports object-oriented and procedural programming. d. combines Windows and Macintosh.

8. Which of the following is the first phase in the software development life cycle? A

a. Analysis b. Design c. Integration d. Implementation

9. A C++ compiler translates C++ into a pseudomachine language called A

a. C++ byte code. b. C++ virtual machine. c. an interpreter. d. a parameter.

10. Which of the following prints or displays characters? D

a. Endl b. Lostream.h c. Cin d. Cout

11. Which of the following source code file extensions are used for C++? B

a. .C++ b. .Cpp c. .Cplus d. .C+plus

12. What name is given to the named location in a computer’s memory which can change during program execution? A

a. Variable b. Const c. Static d. Object

13. Which of the following keywords is used to define a constant variable? D

a. Static b. Literal c. Const d. Final

14. Which of the following is an example of an escape character instruction? C

a. % b. / c. \ d. #

15. Which type of error is encountered if a program performs a division by zero? D

a. Logic b. Syntax c. Pointer d. Run-time

16. Which of the following would be best suited defined as a double rather than an int variable? C

a. The number of boxes of chocolate in an inventory b. The number of leaflets distributed at a mall

c. The distance driven from home to the mall d. The store manager’s name

17. Which of the following quantities would be best represented with a boolean type variable? C

a. The number of tacos ordered b. The average number of tacos sold per day

c. Whether the customer wants a soft or hard shell taco d. The middle initial in the manager’s name

18. Which of the following would be best suited defined as an int rather than a double variable?

a. The number of bananas sold at the market b. The average grade of a student in calculus

c. The height of a football player d. The football player’s name

19. How many bits are used to represent a character with the Unicode standard? B

a. 32 b. 16 c. 8 d. 4

20. Which of the following is not an example of a C++ comment? A

a. /* this is a comment b. // this is a comment c. /* this is a comment */ d. // this is a comment //

21. XYZ is most likely which kind of C++ primitive data type, given the following code? C

XYZ = false;

if (XYZ == true)

answer = ‘H’;

a. Int b. Char c. Bool d. Double

22. In question #21, which kind of primitive data type would it most likely be? B

a. Int b. Char c. Bool d. Double

23. A program which inputs ages of students in a class and outputs the average age of all the students rounded to two decimal places would most likely use which of the following data declarations? B

a. int age, average;

double numOfstudents;

b. int age, numberOfstudents;

double average;

c. int age;

double numOfstudents, average;

d. double age, average, numOfstudents;

24. Which of the following best describes an assignment operator? A

a. The value on the right-hand side of a = is assigned to the variable on the left-hand side of the =.

b. The value on the left-hand side of a = is assigned to the variable on the right-hand side of the =.

c. The value on the right-hand side of a == is assigned to the variable on the left-hand side of the =.

d. The value on the left-hand side of the == is assigned to the variable on the right-hand side of the =.

25. What is the output produced by the following statement when x is 10? C

cout ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download