Computer Science 1

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

The character literal A requires _______ byte(s) of memory, whereas the string literal "A" requires ____ bytes

1 2

stream extraction operator

>> extracts a character from input stream so they can be used in the program

The job of the ________ is to fetch instructions, carry out the operations commanded by the instructions, and produce some outcome or resultant information

CPU (central processing unit)

lets you manually promote and demotes a value general format: static_cast<DataType>(value)

Type cast expression

Every C++ program must have a function named...

main

set of choices presented to the user

menu

allows user to determine the course of action by selecting it from the menu

menu driven program

A program's ability to run on several different types of computer systems is called....

portability

_______ characters or symbols mark the beginning or ending of programming statements, or separate items in a list

punctuation

A group of statements, such as the body of a function, must be enclosed in...

braces or brackets -- {}

C++ tendency to convert operands to the same type

type coercion

When a value too close to 0 is so small that more digits of precision are needed to express it than can be stored in the variable holding it, we have...

underflow

prompt

used in cin programs, lets the user know that input is expects and tells them what needs to be answered

A ______ is a named storage location

variable

programs with algorithms that execute some statements only under certain circumstances

decision structure

A variable must be _____ before it can be used in the program

defined

when a value is converted to a lower data type

demoted

A _____ is an example of a secondary storage device

disk drive

printing an error message after invalid input process of inspecting information given to a program by the user and determining if its valid

input validation

The three primary activities of a program are...

input, processing, and output

A program is a set of...

instructions

To use cout statements you must include the _______ file in your program

iostream

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

key words

function that performs a specific operation

library function

_________ is the only language computers really process

machine

Preprocessor directives begin with a...

#

978.65 x 10^12 would be written in E notation as

9.7865E14

What is the difference between a syntax error and a logical error?

A syntax error is a misuse of a key word, operator, punctuation, or other part of the programming language. A logical error is a mistake that tells the computer to carry out a task incorrectly or to carry out tasks in the wrong order. It causes the program to produce wrong results.

Internally, the CPU consists of the _____ and the ____

ALU (arithmetic logic unit), Control Unit

debugging process where you pretend that you're the computer executing the program. 1.) construct chart with columns for each variable 2.) rows correspond to lines in the program 3.) step through each line and record what happens to the variables after the code is executed

Hand tracing

______________ languages are close to the level of humans in terms of readability

High-level

_____________ languages care close to the level of the computer

Low-level

Both main memory and secondary storage are types of memory. What is the difference between the two?

Main Memory (RAM) is volatile, which means that its contents will be erased when power is removed from the computer. Secondary memory does not lose its contents when power is removed from the computer (ex: disk or CD)

What is the difference between system software and application software?

an operating system is a set of programs that manages the computer's hardware devices and controls their processes. Application software are programs that users use to solve specific problems or perform general operations.

order which an operator works with its operands

associativity

a variable ______________ when a program is running and it enters a section of code that constitutes a variable's scope

comes into scope

actions that are executed only when certain conditions exist are called...

conditionally executed actions

72, 'A', and "Hello World" are all examples of...

constants, or literals

programmer-defined data type whose only legal values are those associated with a set of named integer constants

enumerated data type

named integer constants associated with enumerated data types

enumerators

something that can be evaluated to produce a single variable

expression

the minimum number of character spaces on the screen to print the value in is...

field width

a variable that signals whether or not come condition currently exists in the program

flag

the way a value is printed

formatting

A ________ is a diagram that graphically illustrates the structure of a program

hierarchy chart

_______ is information a program gathers form the outside world

input

When user enters characters using cin, they're temporarily placed in an area of memory known as...

input buffer

a variable but its content is read only and cannot be changed when the program is running

named constant

placing 1 if statement or if/else statement inside another if statement is called...

nested if

statement that does nothing

null statement

The two general categories or software are...

operating systems and application

________ are characters or symbols that perform operations on one or more operands

operators

______ is information a program sends to the outside world

output

When a binary 1 flows into the high bit position, we have...

overflow

Computers can do many different jobs because they can be...

programmed

words or names defined by the programmer are called...

programmer-defined symbols

Since computers can't be programmed in natural human language, algorithms must be written in a ________ language

programming

when a value is converted to a higher data type

promoted

Every complete statement ends with a...

semicolon

type of code where statements are executed one after the other without branching off in another direction

sequence structure

not checking the rest of the expression because the CPU can already tell its true or false

short circuit evaluation

The rules that must be followed when constructing a program are called...

syntax


Set pelajaran terkait

Ch10 Cost of Prod. & P.C. By Kevin Crump

View Set

Psychology Cognitive Approach to Behavior Test

View Set