CPSC Review 1

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Where does program execution begin?

Main()

Windows, MacOS are examples of these. These are the programs that control the entire operation of a computer system (such as I/O, system resources, execution of programs, etc).

Operating Systems

This person from the 1800s is considered to have written the first "computer program". (From the 1800s? How can that be?) There is a computer programming language named after her.

Ada Lovelace

This is the process of analyzing & translating the program from the C program language to a form the computer can understand (machine language); creates an executable.

Compiling

A compiler warning, by default, will prevent an executable from being created. (T or F)

False

A compiler's default settings cause all warnings to be reported during compilation. (T or F)

False

Generally, a programmer should ignore warnings. (T or F)

False

If a compiler says that an error exists on line 90, the actual error may be on line 91, 92, or 93. (T or F)

False

How do a program's statements execute?

Sequentially

This refers to the approach or steps taken to solve the problem, to show the logic for the program before you start coding.

Algorithm

The second sub-step when compiling where the programming language instructions are broken down into assembly language instructions first (.s file) and then converts each assembly language instruction into binary code, or object code (.o file).

Assembler

These are low-level types of instructions that, starting in the early 1950s, allowed the programmer to use a somewhat more English-‐like way of writing instructions by using abbreviations, or mnemonic codes, to refer to the bit-‐patterns.

Assembly Language

Which of these is an example of a run-time error?

Attempting to divide by zero.

These are the base‐2 numbers, represented only with 1s or 0s.

Binary

This person from the 1800s is often called the "father of the computer".

Charles Babbage

A new programmer writes 5 lines of code, compiles and runs, writes 5 more lines, and compiles and runs again. The programmer is ___________

Following good practice

Which of these is an example of a syntax error?

Forgetting a semicolon at the end of a statement where one is required.

Which of these is an example of a semantic error?

Forgetting to divide by 100 when printing a percentage amount.

How long has C been around?

Late 1960's/early 1970's

The first sub-‐step when compiling where certain "administrative" things are taken care of before any compiling takes place (for example a #define, which we'll talk about later). So, for now, think of this sub-‐step as "filling in the blanks" before compiling. (.i file)

Pre-Processor

When a compiler says that an error exists on line 5, that line must have an error. (T or F)

False

This person was the one who had the idea that programs could be written in more English‐like statements than assembly and machine language; also created the first compiler, among many other things.

Grace Murray Hopper

C is a _______________________ programming language (like Ada, BASIC, C++, C#, COBOL, Fortran, Java, Pascal, Perl, Python, Visual Basic).

High-level

These languages, like C, use even more English‐like statements and have few, if any, language elements that translate directly into a machine's native opcodes.

High-level Language

An output statement that uses printf() sends values to a __________

Screen

These are logical errors, e.g., misunderstanding operator precedence, or an infinite loop.

Semantic Error

These are language-specific omissions/errors, e.g., missing a semicolon where one is required.

Syntax Error

If a compiler generates a specific message like "missing semicolon", then a semicolon must be missing somewhere, though maybe from an earlier line than what it's showing. (T or F)

True

Each statement appears on a single _____

Line

Unix - developed at Bell Labs in 1969 in assembly language, re-written in C in 1972 (over 90% of it written in C which makes it much more easily ported to different systems with relatively small effort). What is Unix?

An Operating System

This is the set of instructions that is defined on a processor. Different processors have different ones of these defined on them (within the circuitry of the processor, architecture).

Instruction Set

The last sub-step when compiling that links or adds to the object code any other code being included with the program (from the #includes or from the other program files that are all being compiled together) which then produces the executable program.

Linker

These are the (low-‐level) types of instructions that the computer (processor) understands. They are not human readable; they are machine dependent -‐ only worked on the machine that it was developed for (not portable).

Machine Language

This is a type of programming language that contains a series of computational steps to be carried out; procedures / routines / functions may be called at any point in the program, including by other functions or itself.

Procedural

An experienced programmer writes 80 lines of code, and then compiles and runs. The programmer is probably _______________________________.

Programming Dangerously


Ensembles d'études connexes

CH 30: Management of Patients with Hematologic Neoplasms

View Set

NU372 Week 2 EAQ Evolve Elsevier: Immunity (Custom Quiz)

View Set

Personal Finance Final Exam Quiz

View Set

Section 6 - Dangerous Driving Behaviors

View Set

Super Bowl Commercials Lean On Celebrities

View Set

Mastering Biology Ch. 35, 37+: Body Form and Functions

View Set