COSC 1436 Exam 1 Review

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

if-else examples can also be called ____, because they contain the action taken when the tested condition is true and the action taken when it is false

dual-alternative selections

The ____ monitors the overall activity of the computer and provides services.

operating system

is an English-like representation of the logical steps it takes to solve a problem

pseudocode

In a loop, if the answer to the question results in the loop being entered and the loop statements executing, then the logic ____.

returns to the question that started the loop

The ____ dictate the order in which operations in the same statement are carried out.

rules of precedence

A ____ is a basic unit of programming logic; each structure is a sequence, selection, or loop.

structure

Suppose that sum and num are int variables and sum = 5 and num = 10. After the statement sum += num executes, ____.

sum = 15

A repetition or iteration loop is known as a(n) ____ structure.

while...do

The operating system has a special program that organizes secondary storage so that you can conveniently access information. T/F

True

To develop a program to solve a problem, you start by analyzing the problem. T/F

True

Variable names may not begin with a digit, although usually they may contain digits

True

When you declare variables, you have the option of assigning initial values to them. T/F

True

Whether you are drawing a flowchart or writing pseudocode, to represent decision outcomes you can use either: Yes and No, or True and False.

True

You can replace any individual tasks or steps in a structured flowchart diagram or pseudocode segment with additional structures. T/F

True

17. Case 1 You are making your favorite cookie recipe. You have all the ingredients on hand. You realize that the recipe has both the instructions for baking the cookies in the oven or the microwave. This is an example of a ____ structure.

Dual-alternative Selection

Some programmers call structured programming ____ programming

"goto-less"

The expression static_cast<int>(6.9) + static_cast<int>(7.9) evaluates to

13

The value of the expression 17 % 7 is

3

The value of the expression 33/10, assuming both values are integral data types, is

3

A magic number is a named constant whose meaning is not immediately apparent. T/F

False

A mixed arithmetic expression contains all operands of the same type.

False

A program that is free of syntax errors will produce the correct results. T/F

False

Assembly language, COBOL, Pascal, C, C++, and Java are all high-level languages. T/F

False

C++ programs have always been portable from one compiler to another. T/F

False

In C++, reserved words are the same as predefined identifiers.

False

It is more common for uninitialized variables to have an a valid default value assigned to them, than it is for them to contain an unknown, or garbage value. T/F

False

Professional programmers find it just as easy to modify and maintain structured programs as unstructured programs. T/F

False

Suppose that count is an int variable. The statements --count; and count--; both decrement the value of count by 2.

False

The ASCII data set consists of 127 characters. T/F

False

The command that does the linking on Visual C++ 2008 Express and Visual Studio .Net is Make or Remake.

False

The devices that feed data and programs into computers are called output devices

False

The null string contains one character.

False

The programmer's job can be broken down into five development steps. T/F

False

The value of a variable cannot change during program execution

False

When you compile your program, the compiler identifies the logic errors and suggests how to correct them.

False

Word processors are examples of system programs. T/F

False

A(n) ____ loop is a repeating flow of logic that never ends.

Infinite

A program called a(n) ____ combines the object program with the programs from libraries

Linker

A program that loads an executable program into main memory is called a(n)

Loader

Case 1 You are making your favorite cookie recipe. You have all the ingredients on hand. Every day, you bring two cookies to work until you run out of cookies at home. This is an example of a ____ structure.

Loop

In a ____ structure, you continue to repeat actions while a condition is true.

Loop

The action or actions that occur within a loop are known as ____.

Loop Body

When the power is switched off, everything in ____ is lost.

Main Memory

33. The Billing Department manager, Anna, asked the programmer, Jerry, for a list of customers who owe the ABC Company more than $500. The program is now in production. The Billing Department manager, Anna, asks Jerry to change the report to show only customers who owe more than $500 and who are more than 30 days overdue on their payments. What part of the program development cycle is this?

Maintaining the program

is the process of updating programs after the programs are put into production.

Maintenance

An important feature of modern programming is the ability to build programs from smaller segments. This is known as ____.

Modularity

Structured programs can be easily broken down into routines or ____ that can be assigned to any number of programmers

Modules

Placing a structure within another structure is called

Nesting

A ____ variable can have mathematical operations performed on it.

Numeric

Each programming language uses a piece of software to translate programming language statements into

Object Code

programming focuses on objects, or "things," and describes their attributes and behaviors.

Object-oriented

The devices that the computer uses to display results are called ____ devices.

Output

programming focuses on breaking down programming processes into manageable subtasks.

Procedural

are instruction sets written by programmers.

Programs

Main memory is called

Random Access Memory

In a flowchart, you use a ____ to represent a processing symbol

Rectangle

A(n) ____ value is a predetermined value that means "Stop the program!"

Sentinel

The following pseudocode is an example of a ____ structure. if firstNumber is bigger than secondNumber then print firstNumber else print secondNumber

Sequence

The ____ used in the pseudocode reflects the logic you can see laid out graphically in the flowchart.

Shape

Programs that use ____ code are so difficult to alter that when improvements are required, developers often find it easier to abandon the existing program and start from scratch.

Spaghetti

The popular name for logically snarled program statements is ____ code.

Spaghetti code

structures are attached end-to-end

Stacking Structures

Dividing a problem into smaller subproblems is called ____ design.

Structured

The ____ rules of a programming language tell you which statements are legal, or accepted by the programming language.

Syntax

comprises the programs you use to manage your computer, including operating systems such as Windows, Linux, or UNIX.

System Software

A ______ is when a programmer can execute the program with some sample data to see whether the results are logically correct.

Testing

is a valid int value

46259

The maximum number of significant digits in values of the double type is 15. T/F

True

A variable's ____ describes the kind of values the variable can hold, how much memory the value occupies, and the types of operations that can be performed with the data stored there.

Data Type

is the process of walking through a program's logic on paper before you actually write the program

Desk-checking

You represent a decision in a flowchart by drawing a decision symbol, which is shaped like a

Diamond

represent information with a sequence of 0s and 1s

Digital signals

A(n) ____ is the sequence of steps necessary to solve any problem

Algorithm

The digit 0 or 1 is called a binary digit, or

Bit

Consider the following C++ program. #include <iostream> using namespace std; int main() { cout << "Hello World " return 0; } In the cout statement, the missing semicolon in the code above will be caught by the

Compiler

The language translation software that converts a programmer's statements to binary form is called a ____.

Compiler

The entire set of actions an organization must take to switch over to using a new program or set of programs is called

Conversion

A(n) ____ is a pictorial representation of logical steps it takes to solve a problem.

Flowchart

The term GB refers to

Gigabyte

A loop is a repeating flow of logic that never ends.

Infinite

A computer program to play a game is an example of an application program T/F

True

A sequence of 0s and 1s is sometimes referred to as binary code. T/F

True

Arithmetic and logical operations are carried out inside the CPU

True

As programs get bigger, they get more confusing if they're not structured

True

Computer programmers often refer to memory addresses using hexadecimal notation. T/F

True

If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right.

True

In a structured program, structures can be stacked or connected to one another only at their start or exit points. T/F

True

In arithmetic statements, the rules of precedence can be overridden using parentheses. T/F

True

In code, it is perfectly correct for one branch of the selection to be a "do nothing" branch. T/F

True

In object-oriented design, a program is a collection of interacting objects. T/F

True

No matter which programming language a computer programmer uses, the language has rules governing its word usage and punctuation. T/F

True

Programming is a process of problem solving.

True

The maximum number of significant digits in float values is up to 6 or 7

True

The Billing Department manager, Anna, asked the programmer, Jerry, for a list of customers who owe the ABC Company more than $500. Jerry needs to know more about the report. He asks Anna questions about what the report should look like and what other information should be included on the report. What part of the program development cycle is this?

Understanding the problem

consists of 65,536 characters.

Unicode

Programs that do not follow the rules of structured logic are ____ programs.

Unstructured

Suppose that alpha and beta are int variables and alpha = 5 and beta = 10. After the statement alpha *= beta; executes, ____.

alpha = 50

Word-processing programs, spreadsheets, payroll and inventory programs, and even games are considered to be

application software

In many modern programming languages, the equal sign is the

assignment operator

In a C++ program, one and two are double variables and input values are 10.5 and 30.6. After the statement cin >> one >> two; executes,

one = 10.5, two = 30.6


Kaugnay na mga set ng pag-aaral

Unit 2 Kinematics Triangle Formulas

View Set

Securities Industry Essentials Exam

View Set

State Exam -The Texas Real Estate Commission

View Set

Quiz 2: Denotation, Connotation, Tone, and Nuance

View Set

Part 4: Environmental Emergencies

View Set

NUR101 - Chp. 10 - End-of-Life Care

View Set

Study Guide: Federal Income Tax: Individuals Test #1

View Set