Quiz
C++ Exam #1
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (55)
1C++ requires that you give variables names that indicate what they are used for.
- ATrue
- BFalse
2Machine language is a high level language.
- ATrue
- BFalse
3Software engineering is a field that encompasses designing, writing, testing debugging, documenting, modifying and maintaining programs
- ATrue
- BFalse
4Arithmetic operators that share the same precedence have right to left associativity.
- ATrue
- BFalse
5Floating point constants are normally stored in memory as doubles.
- ATrue
- BFalse
6The preprocessor executes after the compiler.
- ATrue
- BFalse
7Pseudocode is a form of program statement that will always evaluate to false.
- ATrue
- BFalse
8The cin statement will stop reading input when it encounters a new line input.
- ATrue
- BFalse
9In programming the terms line and statement always mean the same thing.
- ATrue
- BFalse
10A preprocessor directive does not require a semicolon at the end.
- ATrue
- BFalse
11A variable called avg should be declared as an int type because it will probably hold data that contains decimal places.
- ATrue
- BFalse
12If you do not follow a consistent programming style, your programs will generate compiler errors.
- ATrue
- BFalse
13A cpu really only understands instructions that are written in machine language.
- ATrue
- BFalse
14In C++ keywords are written in all lowercase letters.
- ATrue
- BFalse
15C++ does not have a built-in datatype for storing strings of characters.
- ATrue
- BFalse
16The only difference between the get function and insertion operator is that get reads the first character type, even if it is a space, tab, or enter key.
- ATrue
- BFalse
17If you want to know the length of a string that is stored in a string object, you can call the object's size member function.
- ATrue
- BFalse
18When typing in your source code into a computer you must be very careful because most of your C++ instructions, header files, and variable names are case sensitive.
- ATrue
- BFalse
19Escape sequences are always stored internally as a single character.
- ATrue
- BFalse
20When the fixed manipulator is used the values specified by the set precision manipulator will be the number of digits to appear after the decimal.
- ATrue
- BFalse
21The ____ decodes an instruction and generates an electrical signal.
- AControl Unit
- BLiterals
22In a C++ program two slash marks indicate…
- AThe Beginning of a comment
- BVariables
- CA Program
23These are the data items whose values do not change while the program is running.
- ARam
- BCin
- CLiterals
24The ____ statement causes a program to wait until information is typed on the keyboard until the enter key is pressed.
- ACin
- BVariable
- CDirective
25When this operator is used with string operands It concatenates them or joins them together
- A(++)
- B(-)
- C(+)
- D(-+)
26This manipulator is used to establish the field width for the value immediately following.
- Afield_width
- Bsetw
- Cset_field
27At the heart of a computer is its CPU, its job is to…
- A(Fetch instructions, carry out operations commanded by the instructions, produce some outcome or resultant information.)
- B( a code editor, a compiler or interpreter, and a debugger, accessed through a single graphical user interface (GUI). )
- C( To identify the location of a byte in memory)
28An IDE typically consists of …
- AVariables
- BActual devices that make up equipment
- CCompilers
- D( a code editor, a compiler or interpreter, and a debugger, accessed through a single graphical user interface (GUI). )
29The purpose of a memory address is …
- AA program
- B( To identify the location of a byte in memory)
- CCarry out operations
30Programmer defined names of memory locations that may hold data are…
- Aa Program
- BProcessor Directive
- CVariables
31A ___ is a set of instructions that a computer follows to solve a problem.
- AA Program
- BProcessor Dircetive
- Clostream header file
32A statement that starts with a # sign is called a…
- AIostream header file
- BProcessor Directive
- CNull terminator
33The __ causes the contents of another file to be inserted into a program
- A(#include transmitter)
- B(#include negative)
- C(#include positive)
- D(#include directive)
34You must have a ____ for every variable you tend to use in a program
- AQuotient
- BNarrative
- CDefinition
- DCombination
35The numeric data types in C++ can be broken down into two general categories
- AInteger and floating point numbers
- BSingle, Double
- CLeft, Right
- DLength, Width
36In any program that uses the cin object you must include ___
- AIostream header file
- BNull Terminator
- CParentheses
37A character literal enclosed is __ quotation marks and string literal is enclosed in ___ quotation marks.
- ASingle, Single
- BDouble, Double
- CSingle, Double
- DSingle, Triple
38In memory C++ automatically places a ___ at the end of string literals.
- ADevice
- BCompiler
- CParentheses
- DNull Terminator
39The function pow(x,5) requires this header file.
- Aamath
- Bbmath
- Ccmath
- Ddmath
40If you want the user to enter then length, width, and height from the keyboard which cin statement is correctly written.
- A(cin.get(length, width, height);
- B(cin(length, width, height);
- C(cin.get(length, width );
- D(cin(height);
41You can use these to override the rules of operator precedence in a mathematical expression
- AComma
- BParentheses
- CVariables
- DOctal
42This manipulator causes the field to be left justified with padding spaces printed to the right.
- ARight
- BLeft
- CLeftRight
- DRightLeft
43What does the term hardware refer to…
- AComputers
- BTerminals
- CActual devices that makeup equipment
- DCreating and Debugging a system
44Which of the following best describes an operator…
- AAn operator allows you to perform operations on one or more pieces of data.
- BAn operator allows you to apply variables on one or more pieces of data.
- CAn operator allows you to perform compilations on one or more pieces of data.
- DAn operator allows you to apply data on one or more pieces of data.
45The programming process consists of several steps which include…
- A(Design, Creation, Testing and Debugging)
- BVariables, Devices, Hexadecimal and octal
46The computer's main memory is commonly known as…
- AMotherboard
- BPower Supply
- CRam
- DCPU
47____ are used to translate each source code’s instructions into the appropriate machine language instruction
- AMonitors
- BVariables
- CCompilers
48For every opening brace in a C++ program there must be a…
- AClosing Brace
- BOpening variable
- COpening Brace
- DClosing Variable
49The ___ is or are used to display information on the computer screen.
- AMonitor
- BIf you don't know this ur dumb-_-
50___ represents storage locations in the computer’s memory.
- ARam
- BOctal
- CVariables
51Besides decimal two other numbering systems you might encounter are…
- AVertical and Horizontal
- BTriagonal and Vertical
- CHexadecimal and octal
52The ___ is an operator that always follows the cin object and the ___ always follows the cout object.
- A>> <<
- B<< <<
- C>> >>
- D<< >>
53___ reads a line of input including leading and embedded spaces and stores them in a string object.
- Aoline
- Bgetline
- Chelpline
- Dtretline
54This function tells the cin object to skip one or more characters in the keyboard buffer
- Acin.stop
- Bcin.skip
- Ccin.decline
- Dcin.ignore
55When a variable is assigned a number that is too large for its data type it ____
- AUndervalues
- BOvervalues
- COverflows
- DUnderflows
Information
- Description
- Programming Quiz on C++ Exam #1, created by Christopher Grus on 02/11/2022.
- Author
- Christopher Grus
- Language
- English
- Views
- 22
- Tags
- Rating
- No ratings yet Rate this quiz
More on C++ Programming Basics