CSLO1.1-1.5PRACTICE TESTIS220 COMPUTER PROGRAMMING

SLO 1.3 Explain three types of basic instructions- input, process output (C1.3 and C2.2)

MULTIPLE CHOICE:

Instructions: Identify the letter of the choice that best completes the statement or answers the question

  1. cin > unit_credit;
  2. is a program
  3. is an input statement
  4. is an output statement
  5. is a variable declaration

Answer:

  1. What does the following line of code display to the screen?

cout < “This is the basic\n programming book\n”;

  1. Nothing
  2. This is the basicn programming book
  3. This is the basic
  4. This is the basic

programming book
Answer:

  1. What does the following code print to the screen?

cout < “kasehlelie”;

  1. KASEHLELIE
  2. Kasehlelie
  3. kasehlelie
  4. Nothing

Answer:

  1. Which of the following lines correctly reads a value from the keyboard and stores it in the variable named myFloat?
  1. cin > myFloat > endl;
  2. cin > > myFloat;
  3. cin < myFloat;
  4. cin > "myFloat";

Answer:

SLO1.4 Identify programming tools-flowcharts, pseudocode, hierarchy chart and documentation basics (VB.Net file)

MULTIPLE CHOICE:

Instructions: Identify the letter of the choice that best completes the statement or answers the question

  1. Pseudocode is
  2. the incorrect results of a computer program.
  3. data that have been encoded for security.
  4. a program that doesn't work.
  5. the obscure language computer personnel use when speaking.
  6. a description of an algorithm similar to a computer language.

Answer:

  1. Which of the following types of charts shows only the relationships between general program tasks without showing specific modules or directions for data flow?

a)top-down chart

b)flowchart

c)both A and B

d)neither A nor B

Answer:

  1. If you are writing a program that needs to repeat a series of calculations, what programming structure should you use to repeat the calculations?

a)sequence structure

b)decision/control structure

c)looping/repeatiition structure

d)unconditional branching

Answer:

  1. "Desk-checking" refers to

a)the continual problem programmers have with losing things.

b)timing a program to see how fast it completes its tasks.

c)testing an algorithm at the flowchart stage using several different kinds of data.

d)having a fellow programmer read your pseudocode to be sure it is understandable.

Answer:

  1. A graphical depiction of the logical steps to carry out a task and show how the steps relate to each other is called a(n)

a)flowchart.

b)pseudocode.

c)algorithms.

d)hierarchy chart.

Answer:

SLO 1.5 Identify and describe the purpose of literals, variables, operators, and functions(C2.1-5, and C4)

MULTIPLE CHOICE:

Instructions: Identify the letter of the choice that best completes the statement or answers the question

  1. Which of the following is a valid identifier?
  2. 3-com
  3. 3com
  4. three_com
  5. 3_com
  6. dollar$

ANSWER:

  1. Which of the following is not a valid identifier?
  2. myInt
  3. return
  4. myInteger
  5. total3

ANSWER:

  1. What is the value of x after the following statements?

int x;

x = 15 %4;

  1. 3
  2. 4
  3. 15
  4. 3.75

ANSWER:

  1. What is the value of x after the following statements?

int x, y, z;

y = 10;

z = 3;

x = y + z * 3;

  1. Garbage
  2. 60
  3. 30
  4. 33

ANSWER:

  1. What is the value of x after the following statements?

int x;

x = x + 30;

  1. 0
  2. 30
  3. 33
  4. garbage

ANSWER:

CIS ProgramBusiness Division COM-FSM National Campus

1