Quiz 1-whatever

Ace your homework & exams now with Quizwiz!

setXXXX and getXXXX methods are also known as __________ methods.

access

why is a do.. while loop described as "bottom driven"

it checks the condition after executing

Why is a while and for loop described as "top-driven"

it checks the condition before executing

A function is to a standard C++ program as a __________ is to an object oriented program.

method

a function can directly (i.e. by itself, not as a consequence of an assignment statement in the calling function) alter _____________ in the calling function

no values

A function knows _______ about the calling code.

nothing

An instance of a class is known as a/an __________.

object

Most lines in a C++ program end with a

semi colon ;

It is legal and acceptable to have two local variables in two different functions with the same name and the same data type

true

main() is a function.

true

Which of the following increments x by 1?

x+=1

What is the value of the expression 25 % 3?

1

How many characters are there in the extended ASCII character set used on our PCs?

256

About how many decimal places of accuracy does a float have?

6

If a read-loop is written to process an unknown number of values using the while construct, and if there is one read before the while instruction there will also be one

at the bottom of the body of the loop

If a function takes two integer arguments it

can return any valid data type

When you write an illegal C++ statement and try to compile and run the program, you will get a

compile error

What instruction will display data on the screen from a C++ program?

cout

Write a single line of C++ code that will display/print only the hour value for an instance of the Time class named time1.

cout << time1. getHour();

According to the lecture notes, the two main conceptual components of a program are _____ and _____.

data and instructions

The variables within a class are known as __________.

data members

`Select the three control structures that (along with sequence) will be studied in this course.

decision, looping, and function calling

Which data type has the largest range?

double

Every function must return a value.

false

Items within a class default to public if the keywords public and private are not include within the class definition.

false

True or False: Constructors can have any name that you desire.

false

True or False: There can be one and only one constructor within a class definition.

false

Name the 3 C++ statements used to create a loop.

for, while, do..while

Given the following declaration: double x; What is the value of x?

garbage

Name one command that is used to implement the decision statement control structure that will be studied in this course.

if

The three basic flow-of-control patterns are sequence, ___________ and __________

if and else

The data type char and the data type __________ are often interchageable in C++.

int

main() marks the beginning of a C++ program. What C++ reserved word precedes it?

int

What is the correct way to declare an integer variable named "score"?

int score;

Name two libraries that should be #include'd at the top of a C++ program

iomanip and iostream


Related study sets

Chapter 31: Transcultural and Social Aspects of Nutrition

View Set

AP GOV REVIEW: Interest Groups, Political Parties and Elections

View Set

Wk 5 - Practice: Fiscal and Monetary Policy Homework [due Day 5]

View Set

Quantitative Methods: CH6 & CH7 Quizzes

View Set