Starting Out with C++ - Chapter 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Define the difference between a key word and a programmer-defined identifier.

A key word is defined by the computer and can only be used for its intended purpose, while a programmer-defined identifier can refer to variables or programming routines as the user wishes.

Describe the difference between a program line and a statement.

A program line represents one horizontal line on the screen, while a statement is a complete instruction that causes an action.

What is an algorithm?

A set of sequential and well-defined steps for performing a task or solving a problem.

What is an integrated development environment?

A single programming environment consisting of several utilities for writing, compiling, and executing code.

What is a memory address?

A unique number identifying the location of the byte in memory.

What are the three primary activities of a program?

Gather input, perform some process on the data, produce output.

What is the purpose of testing a program with sample data or input?

Helps you determine whether the program is producing the desired output or solving the problem as hoped.

What does it mean to "visualize a program running"?

Imagine what will actually appear on the screen while you run the program and decide whether it matches what you want.

What is the difference between a high-level language and a low-level language?

The difference refers to the degree to which the language approximates the level of human readability (high-level) or the level of the computer (low-level).

What must take place in a program before a variable is used?

The variable must be defined.

Why were computer programming languages invented?

To ease the task of programming by using words instead of numbers.

What is the purpose of a memory address?

To identify a particular byte of information in main memory.

Describe what a compiler does with a program's source code?

Translates source code into machine language instructions as object code in an object file, uncovering any syntax errors in the code.

What is the value of visualizing a program running?

Will allow you to address many concerns in the program design and execution before writing the code.

Word processing programs, spreadsheet programs, e-mail programs, web browsers, and game programs belong to what category of software?

application software

What is a runtime error?

error that occurs while the program is running, usually logical error

Internally, the CPU consists of what two units?

1) the logic and arithmetic unit 2) the control unit

What does "portability" mean?

Ability of programs written on one type of computer to be run on many other types of systems.

Describe the steps in the fetch/decode/execute cycle.

CPU's control unit fetches, from main memory, the next instruction; control unit then decodes the instruction, which is in form of number, and generates an electronic signal; signal is routed to the appropriate component of the computer, causing the component to perform an operation.

What is a hierarchy chart?

Chart that starts with overall task and refines this into smaller and smaller subtasks to the point of creating discrete tasks that can be accomplished one by one.

Why is the computer used by so many different people, in so many different professions?

Computers can be programmed to carry out any job that their programs tell them to do.

Briefly describe the difference between procedural and object-oriented programming.

In procedural programming, the programmer creates several statements containing variables in order to carry out functions and tasks; in object-oriented programming, objects contain within themselves both the information (variables) and instructions for what is to be performed on the objects.

Why are variables called "variables"?

Information stored in them may change while program is running.

List the five major hardware components of a computer system.

Input devices, processor, main memory, secondary storage, output devices

What happens to a variable's current contents when a new value is stored there?

It is replaced by the new value.

Explain why computers have both main memory and secondary storage.

Main memory is volatile and so is not saved if there is no energy to the computer; secondary storage is a method for storing data even when computer is not getting energy.

Describe the difference between operators and punctuation symbols.

Operators perform operations on some piece of data, while punctuation simply marks the end of a line.

Explain the operations carried out by the preprocessor, compiler, and linker.

Preprocessor reads the source code and modifies it; compiler translates source code into machine language instruction of object file; linker combines the object file with necessary library routines.

Describe the process of desk-checking.

Programmer runs through steps of program, jotting down contents of variables and sketching what the screen looks like after each output operation.

What four items should you identify when defining what a program is to do?

Purpose of the program, information to be put in, processing that is to take place, and the desired output.

Explain what is stored in an executable file.

Stores machine language instructions, or executable code, ready to run on the computer.

Explain what is stored in a source file.

Stores the statements written by the programmer.

Explain what is stored in an object file.

Stores the translated machine language instructions as object code.

What fundamental set of programs control the internal operations of the computer's hardware?

operating system

What are the two general categories of software?

system software and application software

What do you call a program that performs a specialized task, such as a virus scanner, a file-compression program, or a data-backup program?

utility program


Set pelajaran terkait

Chapter 50: Assessment and Management of Patients With Biliary Disorders

View Set

Gateway to Engineering Chapter 1

View Set

Human Performance & Human Automation Interaction- Quals

View Set

Chapter 3: Visual Displays of Data

View Set

Chapter 16 Mining and Mineral Resources

View Set

Chapter 3: Prenatal Development, Birth, and the Newborn

View Set