Starting Out with C++ Ch1

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

The 3 steps a program typical performs are:

1. Input (gather Input data - from keyboard,from files on disk drive) 2. Process (process the input data) 3. Output (display the results as output ie write it to a file, send it to screen)

In modern computer systems, a byte consists of _____ bits

8

Which of the following is not true? a. An algorithm allows ambiguity. b. An algorithm, when carried out, must eventually stop. c. An algorithm, can be carried out by a human being.

An algorithm allows ambiguity.

A diagram that shows each action performed and the order in which it occurs by a program

Flowchart

Which of these is not a programming language? a. C b. C++ c. HTML d. Java

HTML

What best defines a "programming language"? a. It allows us to control a computer. b. it allows us to make a calculation c. it allows us to execute a program. d. it allows us to express an algorithm.

It allows us to express an algorithm.

Perform operations on pieces of data known as operands

Operators (ex. << >> * + / )

Names made up by the programmer and are not part of the C++ language; May be used represent variables (memory locations), functions, etc.

Programmer-Defined Identifiers

Replace the underlines with the words in parentheses that follow: The ____ solves the ____ of a ____ by expressing an ____ in a ____ to make a ____ that can run on a ____. ( algorithm, computer, problems, program, programmer, programming language, user )

The PROGRAMMER solves the PROBLEMS of a USER by expressing an ALGORITHM in a PROGRAMMING LANGUAGE to make a PROGRAM that can run on a COMPUTER.

Must key words (reserved words) be lowercase?

Yes

A bit is

a binary digit, like 0 or 1.

What translates source code into executable code?

a compiler

A byte in memory is identified by a unique number called its

address

An operating system a. is the chief hardware unit of a computer b. is loaded into the computer each time it needs to carry out an operation c. ensures that programs will not run on the computer at the same time d. allocates resources like memory to programs that are running

allocates resources like memory to programs that are running

At each step of its operation, the input to a Central Processing Unit is

an instruction.

When a program runs on a computer, the part of the computer that carries out the instructions is called the

central processing unit (CPU)

An error in a program that involves a violation of language rules will be detected at ____ time.

compile

Before a variable is used it must be

declared ***note that there is some inconsistency in terminology in C and C++ books and some authors use the term "defined" as well. There are subtle distinction between the terms that are beyond the scope of this chapter***

Mice, trackpads, keyboards, scanners, joysticks are all examples of

input devices

Application software a. processes applications for jobs, school admissions, etc. b. is any software that is run with the support of the operating system c. was invented by Microsoft d. is applied to the computer for the purpose of running the operating system

is any software that is run with the support of the operating system

A binary digit

is zero or one

Words that have a special meaning in a programming language are called

key words

A ______ is usually required to create the final executable code from what the compiler produces from the source code.

link editor

The purpose of testing a program with different combinations of data is to expose run-time and ____ errors.

logical

Which language is closer to machine language? a. low-level language b. high-level language

low-level language

Which statement is NOT true: a. machine languages can be used to express algorithms b. machine languages can be used to write programs that can run on any machines c. machine languages consists of zeros and ones d. machine language is produced by compilers

machine languages can be used to write programs that can run on any machines

Compilers translate the instructions written by the programmer into ____ code.

object

When a program is not running, it is stored

on a disk

Monitors, printers, status lights are all examples of

output devices

The ability to let a programmer develop a program on computer system that can be run on other systems is called

portability

an informal way of writing out the steps that a program should perform

pseudocode

When a program runs on a computer, it is stored in

random access memory (RAM)

Division by zero when the program is executing is an example of a ____ error.

run-time

Flash drives, CDs, external disks are all examples of ______ storage (memory) devices.

secondary

The code that a programmer writes is called ____ code.

source

The rules that govern the correct order and usage of the elements of a language are called the____ of the language.

syntax

An Integrated Development Environment typically includes

text editor, compiler, debugger, and other utilities

Which of the following is true? a. there is exactly one and only one statement on each line of code b. there can be more than one statement on a line, but a statement must not extend over more than one line c. statements can extend over more than one line but there must not be more than one statement on a line. d.there are no language rules regarding statements and line in general

there are no language rules regarding statements and line in general

A location in memory used for storing data and given a name in a computer program is called a ____ because the data in the location can be changed.

variable

RAM, random-access memory, is called that because

you can pick any 2 random locations and it will take the same time to access the data.


Kaugnay na mga set ng pag-aaral

Organic Chemistry Test 2 (Chapters 3-4)

View Set

Week 4: Practice Quiz: Mastering Spreadsheet Basics: Test your knowledge on spreadsheet basics

View Set

ATI Engage Fundamentals Elimination Posttest

View Set

Organizational Leadership Final Exam

View Set

Assignment 9 - Underwriting Umbrella and Excess Liablity Insurance

View Set