COSC 1436 Exam 1

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

True/False: When writing long integer literals or long long integer literals in C++ 11, you can use either an uppercase or lowercase L.

True

These are used to declare variables that can hold real numbers.

Floating point data types

True/False: Floating point constants are normally stored in memory as doubles

TRUE

An Integrated Development Environment typically consists of:

Text editor, compiler, and debugger.

What does the term hardware refer to?

b. The physical components that a computer is made of

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

boolean data type

Which data type typically requires only one byte of storage?

char

The ________ causes a program to wait until information is typed at the keyboard and the Enter key is pressed.

cin object

This statement will pause the screen, until the [Enter] key is pressed.

cin.get();

True/False: The CPU is the most important component in a computer because without it, the computer could not run software.

true

True/False: When C++ is working with an operator, it strives to convert the operands to the same type.

true

The ________ is/are used to display information on the computer's screen.

cout object

To use the rand() function, you must #include this header file in your program.

cstdlib

This term refers to the programmer reading the program from the beginning and stepping through each statement.

desk checking

Three primary activities of a program are:

input, processing, and output.

The numeric data types in C++ can be broken into two general categories:

integar and floating

In any program that uses the cin object, you must include the ________.

iostream header file

This manipulator causes the field to be left-justified with padding spaces printed to the right.

left

Associativity is either right to left or:

left to right

Assume that a program has the following variable definition: char letter; Which of the following statements correctly assigns the character Z to the variable?

letter = 'Z'

In a broad sense, the two primary categories of programming languages are

low level and high level

Programmer-defined names of memory locations that may hold data are:

variables

Every complete C++ program must have a ________.

function named main

Which of the following is a preprocessor directive?

#include <iostream>

You can use these to override the rules of operator precedence in a mathematical expression.

(parentheses)

When this operator is used with string operands it concatenates them, or joins them together.

*

What statement best describes a variable and its primary purpose?

A variable is a named storage location in the computer's memory used for holding a piece of information.

Besides decimal, two other number systems you might encounter in C++ programs are:

Hexadecimal and Octal

In C++ 11, if you want an integer literal to be treated as a long long int, you can append ________ at the end of the number.

LL

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

Program will not complie

The purpose of a memory address is:

To identify the location of a byte in memory

In C++ 11, the ________ tells the compiler to determine the variable's data type from the initialization value.

auto key word

Internally, the CPU consists of two parts:

c. The Control Unit and the Arithmetic and Logic Unit

For every opening brace in a C++ program, there must be a:

closing brace

The function, pow(x, 5.0), requires this header file.

cmath

This step will uncover any syntax errors in your program.

compliling

True/False: Arithmetic operators that share the same precedence have right to left associativity.

false

True/False: In C++, it is impossible to display the number 34.789 in a field of 9 spaces with 2 decimal places of precision.

false

True/False: Machine language is an example of a high-level language.

false

True/False: Pseudocode is a form of program statement that will always evaluate to "false."

false

True/False: The C++ language requires that you give variables names that indicate what the variables are used for.

false

True/False: The fixed manipulator causes a number to be displayed in scientific notation.

false

true/False: In programming, the terms "line" and "statement" always mean the same thing.

false

A(n) ________ is a diagram that shows the logical flow of a program.

flowchart

A(n) ________ is the most fundamental set of programs on a computer.

operating system

Characters or symbols that perform operations on one or more operands are:

operators

When converting some algebraic expressions to C++, you may need to insert ________ that do not appear in the algebraic expression.

operators, parentheses

When a variable is assigned a number that is too large for its data type, it:

overflows

A statement that starts with a # symbol is called a:

preprocessor directives

This is used in a program to mark the beginning or ending of a statement, or separate items in a list.

punctuation

What is the modulus operator?

represented by the keyword Mod; divides two numbers and returns the remainder of the division; used to determine if a number is odd or even; if you divide by 2 the answer will be 0 (even) and if you get 1 it is odd

Which escape sequence causes the cursor to move to the beginning of the current line?

return

The total number of digits that appear before and after the decimal point is sometimes referred to as:

significant digits and precision

Computer programs are also known as:

software

The statements written by the programmer are called:

source code

In the process of translating a source file into an executable file, which of the following is the correct sequence?

source code, preprocessor, modified source code, compiler, object code, linker, executable cod

This is a set of rules that must be followed when constructing a program.

syntax

At the heart of a computer is its central processing unit. The CPU's job is:

Fetch instructions, carry out operations commanded by the instructions, produce some outcome or resultant information.

An example of a secondary storage device is:

d. Disk drive

When the final value of an expression is assigned to a variable, it will be converted to:

data type of that variable


Set pelajaran terkait

Pos psych - Book notes Ch. 7 (pg. 267 - 301)

View Set

Google Data Analytics - Process Data from Dirty to Clean - Course 4

View Set

The Rowlatt Acts and the Amritsar Massacre

View Set

Lesson 2 Estructura 2.2 Forming questions in Spanish Audio

View Set

Essay #8 Analyze continuities and changes in the political, economic, or cultural practices of Mongolian society ​between the rise of Chinggiss Khan and the demise of the Mongolian empire in the 15th century.

View Set

Software Security Midterm Exam Questions (Practice)

View Set

Basics of Property and Casualty Insurance

View Set