COMP 150 Final EXAM 1

¡Supera tus tareas y exámenes ahora con Quizwiz!

This step will uncover any syntax errors in your program compiling executing linking editing none

a

A character literal is enclosed in ______ quotation marks, whereas a string literal is enclosed in _________ quotation marks single, double double single triple double open closed none

a

Mistakes that cause a running program to produce incorrect results are called logic errors syntax errors compiler errors linker errors none

a

These are used to declare variables that can hold real numbers

floating point data types

char letter; Correctly assign the character Z to the variable

letter='Z';

Assume that a program has the following string object definition string name; assign string literal to the string object

name= "Jane";

If you use a C++ key word as an identifier, your program will

not compile

Windows 10 is an example of _____________ software.

operating system

A variables ______ is the part of the program that has acccess to the variable

scope

This is used to mark the end of a complete C++ programming statement

semicolon

What would be the optimum C++ data type to store a whole number that will range from 0 to 200?

short

This function in C++ allows you to identify how many bytes of storage on your computer system an integer data value requires

sizeof

In programming terms a group of characters inside a set of quotation marks is called a

string literal

In a C++ program two slash marks indicate

the beginning of a commentc

cookies = number % children; number=38 children=4

2

x=18/4 what is x

4

What is the ASCII value for 'H'

72

Assume you are using a system with 1 byte characters, how many bytes of memory will the following string literal copy occupy "William"

8

A CPU really only understands instructions that are written in machine langauge

T

A preprocessor directive does not require a semicolon at the end

T

In C++ key words are written in all lowercase letters

T

Of the following which is a valid C++ identifier June1997 myExtraLongVariableName _employer_number _department all of the above

all

For every opening brace in a C++ program there must be a string literal closing brace function variable none

b

The statements written by the programmer are called syntax source code runtime libraries object code none

b

What does the term hardware refer to? A) The logical flow of instructions B) The physical components C) The way a computer's storage space is organized D) the relative difficulty of programming E) None

b

Which of the following is a preprocessor directive //This program calculates the users pay. #include <iostream> cin>>rate; pay=hours*ratel int main()

b

Words that have a special meaning and may be used only for their intended purpose are known as operators key words programmer defined words syntax none

b

A variable whose value can be either true or false is of this data type

bool

A set of well defined steps for performing a task or solving a problem is known as a(n): encoded instruction hierarchy algorithm central processing unit none of these

c

A variable declaration announces the name of a variable that will be used in a program, as well as the number of times it will be used in the program the area of the code in which it will be used the type of data it will be used to hold the operators that will be used on it none

c

THe ________ causes the contents of another file to be inserted into a program pound sign semi colon

c

Which data type typically requires only one byte of storage

char

A(n) ___________ is a set of instructions that the computer follows to solve a problem. operator linker compiler program none

d

An integrated Development Environment typically consists of: A) A text editor B) Debugger C) A compiler D)All of the above E) None

d

Internally, the CPU consists of two parts the software and hardware the single task device and the multi task device the output device and the input device the control unit and the arithmetic and logic unit none

d

___________ are used to translate each source code instruction into the appropriate machine language instruction. modules preprocessor directives Library routines Compilers none

d

ASCII is an acronym for:

American Standard Code for Information Interchange

A variable called average should be declared as an integer data because it will probably hold data that contains decimals

F

The preprocessor executes after the compiler

F

Programmer-defined names of memory locations that may hold data are: syntax operators operands variables none

c

Three primary activities of a program are lines, statements, and punctuation integer, floating point, and character input, processing, and output variables, operators, and key words

c

Which of the following is not one fo the five major components of a computer system input/output device secondary storage device preprocessor main memory the CPU

c

THe ______ is/are used to display information on the computers screen opening and closing braces opening and closing quotation marks backlash cout object

d

The computers main memory is commonly known as: the floppy disk secondary storage the hard disk RAM none

d

The numeric data typess in C++ can be broken into two general categories singles and doubles real and unreal numbers and characters integer and floating point none

d


Conjuntos de estudio relacionados

KNSFHP Addictive Behaviors study 3/3

View Set

Chapter 46- prep you (lower GI disorders)

View Set

Abeka Grammar & Composition V Test 1

View Set