Quiz
Section 1-7
Erstelle ein kostenloses Konto, um dieses Quiz zu beenden
Speichere deinen Fortschritt und sieh dir dein Endergebnis an.
oder mit deiner E-Mail registrieren
Schon ein Konto? Anmelden
Fragen in diesem Quiz (70)
1The ____ and ____ were established to standardize the syntax of C++.
- AAmerican National Standard Organization (ANSO); International Standard Institute (ISI)
- BAmerican Standard Code for Information Interchange (ASCII); International Standard Organization (ISO)
- CAmerican National Standard Institution (ANSI); International Standard Organization (ISO)
- DAmerican National Standard Institution (ANSI); Unicode
Analysis
2The language of a computer is called ____.
- Amachine language
- Bassembly language
- Csource code
- Dsystem code
3A(n) ____ monitors the overall activity of the computer and provides services.
- Acompiler
- Bassembler
- Ccontrol unit
- Doperating system
4A program called the ____ combines the object program with other programs in the library and is used in the program to create the executable code.
- Ajoiner
- Blinker
- Ccombiner
- Dassembler
5A(n) ____ is a unique location in main memory for each cell.
- Acounter
- Baddress
- Cregister
- Dsignal
6ASCII is a(n) ____-bit code.
- Aseven
- Bsixteen
- Ceight
- Dtwo
7A(n) _____ program is the machine language version of the high-level language program.
- Asource
- Bobject
- Cpreprocessor
- Dlinker
8Word processors, games, and spreadsheets are examples of ____ programs.
- Asystem
- Bsource
- Capplication
- Doperating
9Main memory consists of an ordered sequence of ____.
- Amemory cells
- Bregisters
- Clogical units
- Dsignals
10In a C++ program, statements that begin with the # symbol are called ____ directives.
- Alibrary
- Bpreprocessor
- Coperator
- Dpostprocessor
11If all operands in an expression are integers, the expression is called a(n) _____ expression.
- Asingle precision
- Bintegral
- Cinteger
- Ddouble precision
12____ are names of things that appear in a program, such as variables, constants, and functions.
- AComments
- BTokens
- CData types
- DIdentifiers
13A string containing no characters is called a(n) ____ string.
- Aempty
- Bmissing
- Czero
- Dnon
14The smallest individual unit of a program written in any language is called a _____.
- Abit
- Btoken
- Csymbol
- Dbyte
15In C++, a ____ is used to end a statement.
- Aforward slash
- Bsemicolon
- Ccomma
- Dperiod
16In C++, the cast operator takes the following form: ____.
- Astatic_cast<dataTypeName>(expression)
- Bstatic_cast<dataTypeName>
- Cstatic_cast (expression)
- Dexpression<static_cast> (dataTypeName)
17When using the char data type, you enclose each character represented within ____.
- Aparentheses
- Bdouble quotation marks
- Csingle quotation marks
- Dbrackets
18A(n) ____ is a set of values together with a set of operations.
- Afunction
- Bsequence
- Cdata type
- Doperand
19The _____ data type is used to represent any real number between -3.4E+38 and 3.4E+38.
- Adouble
- Bint
- Cfloat
- Dlong double
20_____ lines are executable statements that inform the user what to do.
- APrompt
- BComment
- CDocument
- DQuestion
21To force floating-point output to show the decimal point and trailing zeros, use the ____ manipulator.
- Apoint
- Bscientific
- Cshowpoint
- Ddecimal
22The ____ manipulator controls the output of only the next expression.
- Afixed
- Bsetprecision
- Csetw
- Dshowpoint
23The extraction operator takes ____ operands.
- Azero
- Bone
- Ctwo
- Dthree
24The output stream variables can use the manipulator ____ to fill the unused columns with a character other than a space.
- Asetw
- Bcharfill
- Csetfill
- Dsetchar
25Variables of type ____ are called input stream variables.
- Aistream
- Bstream
- Costream
- Diostream
26The manipulator ____ is used to output floating-point numbers in scientific format.
- Asets
- Bfixed
- Cscientific
- Dsetsci
27I/O functions are typically called ____ member functions.
- Astream
- Bcommon
- Caccess
- Duser
28To left-justify output in C++, use the ____ manipulator.
- Asetcolumn
- Bleft
- Cjustify
- Dsetleft
29A ____ is an area in secondary storage used to hold information.
- Amember
- Bfile
- Csector
- Dvariable
30You can use the ____ function to restore an input stream to a working state.
- Aclear
- Bflush
- Cinit
- Dignore
31Which of the following is NOT a reserved word in C++?
- Abreak
- Bcase
- Cselect
- Ddefault
32You can use either a(n) ___ variable or a bool variable to store the value of a logical expression.
- Afloat
- Bint
- Cstring
- Ddouble
33When using a return statement, the return of any value other than ____ indicates that something went wrong during program execution.
- A1
- B0
- C-1
- Deof
34To permit more than one statement to execute if an expression evaluates to true, C++ provides a structure called a ____ statement.
- Aswitch
- Bone-way selection
- Ccompound
- Dtwo-way selection
35When C++ evaluates a logical expression, any nonzero value is treated as _____.
- Aa logical error
- Ba syntax error
- Cfalse
- Dtrue
36In ____ evaluation, the computer evaluates a logical expression from left to right and stops as soon as the value of the expression is known.
- Aconditional
- Bdecision maker
- Cshort-circuit
- Dassociative
37Which of the following expressions evaluates to true?
- A(14 >= 5) && ('A' < 'B')
- B!('A' < 'B')
- C!(6 <= 7)
- D(24 >= 35) && ('A' < 'B')
38Which of the following expressions evaluates to true?
- A"Hello" = "hello"
- B"Bill" >= "Billy"
- C"Hello" > "Hi"
- D"Air" < "An"
39Given the input stream variable cin, the expression ____ evaluates to true if the last input succeeded.
- A(cin = 1)
- B(cin <<)
- C(cin)
- D(cin == 0)
40If the possible range of values for a multiple selection statement cannot be reduced to a finite set of values, you must use the ____ structure.
- Anested if
- Bif
- Cswitch
- Dif ... else
41The function time is defined in the header file ____.
- Acstdlib
- Bctime
- Ccmath
- Diomanip
42Which of the following is the general form of the do...while statement?
- Ado statement while (expression);
- Bdo (statement); while expression
- Cdo while statement (expression);
- Ddo expression while (statement);
43Putting one control structure inside another is called ____.
- Alooping
- Bindexing
- Csequencing
- Dnesting
44The C++ eof function is a member of the data type ____.
- Aiomanip
- Bistream
- Ccstdlib
- Dfile
45The function rand() is defined in the header file ____.
- Aiostream
- Biomanip
- Ccstdlib
- Dcmath
46When the ____ statement executes in a repetition structure, it immediately exits from the structure.
- Acontinue
- Bexit
- Cdo
- Dbreak
47A _____ is a special value that marks the end of the input data.
- Atrigger
- Bswitch
- Csentinel
- Dconstant
48The _____ statement is an effective way to avoid extra variables to control a loop and produce elegant code.
- Abreak
- Bswitch
- Ccontinue
- Dskip
49The _____ loop is a pretest loop.
- Aindexed
- Bwhile
- Cswitch
- Ddo...while
50The primary purpose of the ____ loop is to simplify the writing of counter-controlled loops.
- Asentinel
- Bdo-while
- Cnested
- Dfor
51The heading of a function includes all of the following EXCEPT the ____.
- Anumber of parameters
- Bdata type of the parameters
- Cdata type of the return value
- Dcode required to accomplish the task
52A variable for which memory is allocated at block entry and deallocated at block exit is called a(n) _____ variable.
- Astatic
- Bidentification
- Cunique
- Dautomatic
53A ____ parameter is a formal parameter that receives the location (memory address) of the corresponding actual parameter.
- Astatic
- Bmemory
- Cvalue
- Dreference
54Which of the following statements is FALSE?
- ADefault values can be constants, global variables, or function calls.
- BIf you do not specify the value of a default parameter, the default value is used for that parameter.
- CYou can assign a constant value as a default value to a reference parameter.
- DThe calling function has the option of specifying a value other than the default for any default parameter.
55The C++ function pow has ____ parameters.
- Azero
- Bthree
- Cone
- Dtwo
56The _____ of an identifier refers to where in the program an identifier is accessible.
- Aparameter
- Bbehavior
- Cscope
- Ddefinition
57If a function is overloaded, then in a call to that function, the _____ determines which function to execute.
- Ascope
- Bdeclaration
- Cdefinition
- Dsignature
58The C++ function ____ calculates the largest whole number that is less than or equal to x.
- Aceil(x)
- Bfloor(x)
- Cabs(x)
- Deqwhole(x)
59____ parameters provide a one-way link between actual parameters and formal parameters.
- AReference
- BGlobal
- CStatic
- DValue
60In C++, :: is called the scope ____ operator.
- Aidentity
- Bcomparison
- Cequivalent
- Dresolution
61In C++, [ ] is called the _____ operator.
- Aarray subscript
- Bcharacter
- Carray
- Darray index
62You can use the ____ operator to increment or decrement the value of an enumeration type.
- Aassignment
- Bscope resolution
- Cstream
- Dcast
63You can access an individual character within a string using the array subscript operator together with the ____.
- Avalue of the character in single quotes
- Bposition of the character in the string
- Cthe integer equivalent of the character value
- Dvalue of the character in double quotes
64If a global identifier in a program has the same name as a global identifier in an included header file, the ____.
- Acompiler automatically generates a new name for the global identifier in the program
- Bcompiler generates a syntax error
- Cglobal identifier in the program overrides the global identifier in the header file
- Dglobal identifier in the header file overrides the global identifier in the program
65The operator ____ can be used to concatenate two values of type string.
- A&
- B::
- C+
- D-
66Before using the data type string, the program must use which of the following statements to include the header file?
- A#include (cstring)
- Binclude <#string>
- C#include <cstring>
- D#include <string>
67The ____ function is used to interchange the contents of two string variables.
- Asubstr
- Bswitch
- Cswap
- Dchange
68The enumeration type is a(n) ____ type.
- Aintegral
- Bstring
- CBoolean
- Dcharacter
69The values that you specify for an enumeration type must be _____.
- Aidentifiers
- Bsorted
- Creserved words
- Dtrue or false
70An enumeration type is a set of ____ values.
- Aconstant
- Bordered
- Cunordered
- Danonymous
Informationen
- Beschreibung
- Exam review
- Autor
- N EO
- Sprache
- English
- Aufrufe
- 5
- Schlagwörter
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz
Mehr zu C++ Programming Basics