- AWrite code immediately
- BUnderstand and define the problem clearly
- CCompile the program
- DRun test cases
Correct Answer:
B) Understand and define the problem clearly
- AA programming language
- BA step-by-step procedure to solve a problem
- CA computer device
- DA type of memory
Correct Answer:
B) A step-by-step procedure to solve a problem
- AStore data permanently
- BRepresent the logic of a solution visually
- CTranslate code to machine language
- DMeasure program speed
Correct Answer:
B) Represent the logic of a solution visually
- AReplacing hardware
- BExpressing solution steps in simple structured language
- CRemoving all bugs automatically
- DCreating executable files
Correct Answer:
B) Expressing solution steps in simple structured language
- ADeleting extra code
- BBreaking a large problem into smaller parts
- CCombining all files
- DReducing RAM usage
Correct Answer:
B) Breaking a large problem into smaller parts
- AInput, Process, Output
- BInitialize, Program, Operate
- CInput, Print, Operate
- DInspect, Process, Organize
Correct Answer:
A) Input, Process, Output
- AInput/output
- BStart/end
- CA condition or branching point
- DA connector
Correct Answer:
C) A condition or branching point
- AA process or instruction
- BA loop only
- CA decision
- DAn output device
Correct Answer:
A) A process or instruction
- AArithmetic operations
- BStart and end
- CVariable declaration
- DComments
Correct Answer:
B) Start and end
- AInstall the compiler
- BFollow step execution using sample values
- CCreate machine code
- DIncrease processor speed
Correct Answer:
B) Follow step execution using sample values
- APrograms and data are stored in memory
- BThe CPU is optional
- COnly output matters
- DEach device has its own language
Correct Answer:
A) Programs and data are stored in memory
- AScanner
- BArithmetic Logic Unit
- CMonitor
- DPrinter
Correct Answer:
B) Arithmetic Logic Unit
- ADisplaying graphics
- BDirecting and coordinating operations
- CStoring files forever
- DTyping source code
Correct Answer:
B) Directing and coordinating operations
- AStore currently running programs and data
- BPrint reports
- CSend emails
- DScan documents
Correct Answer:
A) Store currently running programs and data
- AShow results
- BEnter data into the computer
- CStore backups offline
- DCool the processor
Correct Answer:
B) Enter data into the computer
- AReceive user data only
- BDisplay processed results
- CTranslate all programs
- DControl loops
Correct Answer:
B) Display processed results
- AIs close to human language and easier to understand
- BRuns only on high floors
- CNeeds no translator
- DIs part of hardware
Correct Answer:
A) Is close to human language and easier to understand
- AEnglish commands
- BBinary instructions understood directly by the computer
- CFlowchart symbols
- DMathematical formulas only
Correct Answer:
B) Binary instructions understood directly by the computer
- AThe translated machine code
- BThe program written by a programmer
- CThe output of the linker
- DThe printed document
Correct Answer:
B) The program written by a programmer
- ALogic is incorrect though code runs
- BThe rules of the language are violated
- CInput is too large
- DA file is saved
Correct Answer:
B) The rules of the language are violated
- AThe compiler crashes
- BThe program runs but produces wrong results
- CThe keyboard is disconnected
- DThe program cannot be loaded
Correct Answer:
B) The program runs but produces wrong results
- ARemoves the need for coding
- BHelps verify logic before or during implementation
- CAdds memory automatically
- DConverts source to object code
Correct Answer:
B) Helps verify logic before or during implementation
- APrinters
- BAlgorithms
- CKeyboards
- DDatabases
Correct Answer:
B) Algorithms
- AAmbiguous and lengthy
- BClear, correct, and efficient
- CDependent on one machine only
- DImpossible to test
Correct Answer:
B) Clear, correct, and efficient
- AIgnoring everything always
- BFocusing on important details while hiding unnecessary complexity
- CWriting very long code
- DAvoiding variables
Correct Answer:
B) Focusing on important details while hiding unnecessary complexity
- ACreate hardware circuits
- BTranslate source code into machine/object code
- CDisplay flowcharts
- DStore files permanently
Correct Answer:
B) Translate source code into machine/object code
- ATake user input
- BCombine object files and libraries into an executable program
- CEdit source code
- DCompress images
Correct Answer:
B) Combine object files and libraries into an executable program
- AExecutes code line by line
- BNeeds no source code
- CWorks only for assembly
- DProduces hardware output
Correct Answer:
A) Executes code line by line
- AA flowchart drawing
- BThe low-level translated form of source code
- CAlways human-readable pseudocode
- DA backup copy of RAM
Correct Answer:
B) The low-level translated form of source code
- AOnly pictures
- BReusable prewritten code or functions
- CDamaged files
- DCPU registers
Correct Answer:
B) Reusable prewritten code or functions
- ACompilation
- BExecution
- CPrinting
- DFile saving
Correct Answer:
A) Compilation
- ACan be directly run by the operating system
- BContains only comments
- CMust always be interpreted manually
- DStores only images
Correct Answer:
A) Can be directly run by the operating system
- AA hardware chip
- BA meaningful unit such as keyword, identifier, or operator
- CAn output device
- DA debugging tool
Correct Answer:
B) A meaningful unit such as keyword, identifier, or operator
- AWords programmers may freely rename
- BKeywords with special predefined meaning
- CComments added by users
- DVariable values
Correct Answer:
B) Keywords with special predefined meaning
- ASpeed up execution greatly
- BImprove readability and documentation
- CReplace variables
- DGenerate machine code
Correct Answer:
B) Improve readability and documentation
- AA random memory cell
- BA complete instruction for the computer
- CAlways a function call
- DOnly an arithmetic expression
Correct Answer:
B) A complete instruction for the computer
- AUncontrolled jumps everywhere
- BClear sequence, selection, and repetition
- CRemoving all functions
- DUsing only one variable
Correct Answer:
B) Clear sequence, selection, and repetition
- AStarting from detailed code first
- BBreaking the solution from general steps into smaller modules
- CWriting from bottom of screen
- DCompiling before analysis
Correct Answer:
B) Breaking the solution from general steps into smaller modules
- ADamage program logic
- BImprove readability and sometimes define blocks
- CReplace semicolons in all languages
- DCreate variables
Correct Answer:
B) Improve readability and sometimes define blocks
- AMeaning or valid use of constructs
- BPrinter failure
- CElectric power loss
- DFont selection
Correct Answer:
A) Meaning or valid use of constructs
- AProblem analysis
- BAlgorithm design
- CTesting and debugging
- DIgnoring outputs
Correct Answer:
D) Ignoring outputs
- ACreating new hardware
- BFinding and fixing errors in a program
- CTranslating source to assembly only
- DMaking variables constant
Correct Answer:
B) Finding and fixing errors in a program
- ARecycling memory
- BLinking modules
- CTyping faster
- DChanging monitor settings
Correct Answer:
B) Linking modules
- AMakes maintenance and testing easier
- BForces one giant function
- CPrevents reuse
- DRemoves logic from programs
Correct Answer:
A) Makes maintenance and testing easier
- AIt can run on different systems with little or no change
- BIt fits in a small folder
- CIt avoids input
- DIt needs no compiler
Correct Answer:
A) It can run on different systems with little or no change
- AMore confusing code
- BBetter readability and maintainability
- CFaster internet
- DAutomatic bug removal
Correct Answer:
B) Better readability and maintainability
- AA loop body
- BA main function or starting routine
- CA comment block
- DA string literal
Correct Answer:
B) A main function or starting routine
- ABefore successful program execution
- BAfter printing output
- COnly on Friday
- DBy changing hardware
Correct Answer:
A) Before successful program execution
- AOnly electricity
- BEditing, building, and debugging tools in one environment
- CA new programming language
- DPermanent data storage
Correct Answer:
B) Editing, building, and debugging tools in one environment
- AThe code is perfect
- BThere may be a potential issue even if compilation succeeds
- CThe program has been deleted
- DRAM is full
Correct Answer:
B) There may be a potential issue even if compilation succeeds
- AA fixed value that never changes
- BA named memory location used to store data
- CA type of compiler
- DAn output statement
Correct Answer:
B) A named memory location used to store data
- ATo delete memory
- BIts name and data type
- CTo run the program
- DTo print the value
Correct Answer:
B) Its name and data type
- AWhole numbers
- BText sentences
- CTrue/false only
- DDecimal fractions only
Correct Answer:
A) Whole numbers
- ACharacter storage
- BNumbers with fractional parts
- CFile names
- DBoolean conditions
Correct Answer:
B) Numbers with fractional parts
- AA single symbol such as 'A'
- BA full paragraph
- CA floating value
- DMultiple arrays
Correct Answer:
A) A single symbol such as 'A'
- ALetters only
- BTrue/false values
- CDecimal numbers only
- DFile handles
Correct Answer:
B) True/false values
- ARemoving a variable
- BGiving a variable its first value
- CConverting code to binary
- DReading a file
Correct Answer:
B) Giving a variable its first value
- AA value that does not change during program execution
- BA changing variable
- CA temporary bug
- DA loop counter only
Correct Answer:
A) A value that does not change during program execution
- AStart with any punctuation mark
- BBe meaningful and follow language rules
- CContain spaces always
- DMatch the answer key
Correct Answer:
B) Be meaningful and follow language rules
- AGuaranteed correct output
- BUnpredictable results
- CAutomatic optimization
- DPermanent storage
Correct Answer:
B) Unpredictable results
- AAdd comments
- BConvert one data type to another
- CCreate a loop
- DRead a file
Correct Answer:
B) Convert one data type to another
- AMake code shorter only
- BProvide data during program execution
- CTranslate the compiler
- DBuild libraries
Correct Answer:
B) Provide data during program execution
- ADisplay information to the user
- BDeclare variables
- CCreate processors
- DDefine algorithms
Correct Answer:
A) Display information to the user
- AConfuses the user
- BTells the user what input is expected
- CDeletes previous input
- DStops execution
Correct Answer:
B) Tells the user what input is expected
- AA monitor
- BA variable
- CA printer
- DA compiler
Correct Answer:
B) A variable
- AAlways holds numbers only
- BContains a sequence of characters
- CUses less memory than one char
- DCannot be displayed
Correct Answer:
B) Contains a sequence of characters
- AtotalMarks
- B_count
- C2value
- Dstudent_name
Correct Answer:
C) 2value
- AOnly screen color
- BThe kind of values a variable can hold and related operations
- CInternet speed
- DWhether code has comments
Correct Answer:
B) The kind of values a variable can hold and related operations
- ANo variables
- BSeparate variables or data structures
- CA printer driver
- DA linker option
Correct Answer:
B) Separate variables or data structures
- AOrganizing displayed values neatly
- BCompiling faster
- CRemoving syntax errors
- DChanging the CPU
Correct Answer:
A) Organizing displayed values neatly
- AA value written directly in the program
- BA memory leak
- CAn external device
- DA loop block
Correct Answer:
A) A value written directly in the program
- A98
- B3.14
- C"Hello"
- Dfalse
Correct Answer:
C) "Hello"
- AInto a variable
- BInto the compiler
- CInto the keyboard
- DInto a flowchart
Correct Answer:
A) Into a variable
- Ax becomes zero
- Bx is increased by one
- Cx is compared with one
- Dx is printed
Correct Answer:
B) x is increased by one
- AAccept every value blindly
- BCheck whether entered data is reasonable and correct
- CConvert source to object code
- DAvoid all variables
Correct Answer:
B) Check whether entered data is reasonable and correct
- AMake decisions only
- BPerform mathematical calculations
- CRead files
- DCreate comments
Correct Answer:
B) Perform mathematical calculations
Correct Answer:
B) %
Correct Answer:
A) 2
- AStore files
- BCompare two values
- CCreate loops only
- DCompile code
Correct Answer:
B) Compare two values
Correct Answer:
B) true
- AAt least one condition is true
- BBoth conditions are true
- CBoth conditions are false
- DOnly the first is true
Correct Answer:
B) Both conditions are true
- ABoth conditions are false
- BAt least one condition is true
- CBoth conditions are true
- DOnly one is true
Correct Answer:
A) Both conditions are false
- AAdd numbers
- BReverse a Boolean value
- CStore strings
- DMultiply values
Correct Answer:
B) Reverse a Boolean value
- AWhere output appears
- BWhich operator is evaluated first
- CHow files are opened
- DHow many variables exist
Correct Answer:
B) Which operator is evaluated first
- AAlways slow programs
- BMake intended evaluation order clear
- CRemove variables
- DReplace assignment
Correct Answer:
B) Make intended evaluation order clear
- ACompares two values
- BStores the right-hand value in the left-hand variable
- CEnds a loop
- DStarts a function
Correct Answer:
B) Stores the right-hand value in the left-hand variable
Correct Answer:
B) <=
- Afalse
- Btrue
- C5
- Dan error always
Correct Answer:
B) true
- Aage > 18 || age < 60
- Bage >= 18 && age <= 60
- Cage = 18 to 60
- D18 <= age or 60
Correct Answer:
B) age >= 18 && age <= 60
- AThe quotient
- BThe remainder or fractional part
- CThe dividend
- DThe operator
Correct Answer:
B) The remainder or fractional part
- AOnly comments
- BThe operand types and operators used
- CMonitor size
- DFile name
Correct Answer:
B) The operand types and operators used
- AReducing it by one
- BIncreasing it by one
- CMaking it constant
- DConverting it to text
Correct Answer:
B) Increasing it by one
- Ax = x + 3
- Bx == 3
- Cx = 3 only
- Dx is Boolean
Correct Answer:
A) x = x + 3
- AEvaluate all operands always
- BStop evaluation once the result is known
- CDelete the second condition
- DPrint the answer
Correct Answer:
B) Stop evaluation once the result is known
- AUsing comments
- BStoring a very large value in a small integer type
- CDeclaring a string
- DReading a small number
Correct Answer:
B) Storing a very large value in a small integer type
- AA named memory block only
- BA combination of values, variables, and operators that produces a result
- CA hardware device
- DA complete flowchart
Correct Answer:
B) A combination of values, variables, and operators that produces a result
- Ax is positive
- Bx is not greater than zero
- Cx becomes zero
- Dx is printed
Correct Answer:
B) x is not greater than zero
Correct Answer:
B) *
- ADecimals cannot exist
- BRepresentation can introduce precision issues
- CCompilers forbid it
- DBooleans change it
Correct Answer:
B) Representation can introduce precision issues
- AThe smaller of a and b
- BThe larger value if a>b else b
- CA Boolean only
- DNothing
Correct Answer:
B) The larger value if a>b else b
- AStore files
- BMake decisions in a program
- CCreate arrays only
- DTranslate source code
Correct Answer:
B) Make decisions in a program
- Aif statement
- Bfor loop
- Carray
- Dfunction parameter
Correct Answer:
A) if statement
- Afalse
- Btrue
- Cempty
- Dnegative only
Correct Answer:
B) true
- ARepeat the condition
- BProvide an alternate block when condition is false
- CEnd the program
- DCreate a variable
Correct Answer:
B) Provide an alternate block when condition is false
- AOnly one condition exists
- BMultiple conditions must be tested in sequence
- CNo condition is required
- DUsing strings only
Correct Answer:
B) Multiple conditions must be tested in sequence
- Aif statements placed inside another if or else block
- BAlways invalid
- CUsed only in hardware
- DThe same as comments
Correct Answer:
A) if statements placed inside another if or else block
- AComplex floating arithmetic only
- BSelecting among many discrete cases of one expression
- CAllocating memory
- DReading files
Correct Answer:
B) Selecting among many discrete cases of one expression
- AThe first case matches
- BNo listed case matches
- CEvery case matches
- DThe loop ends
Correct Answer:
B) No listed case matches
- AA string
- BA Boolean result
- CA file pointer
- DAn array
Correct Answer:
B) A Boolean result
- ASelection
- BRecursion
- CLinking
- DCompilation
Correct Answer:
A) Selection
- ARemoving indentation
- BUsing clear block structure and braces
- CUsing more comments only
- DAvoiding all if statements
Correct Answer:
B) Using clear block structure and braces
- AMust always be nested
- BCan all be tested separately
- CNever execute
- DBecome loops
Correct Answer:
B) Can all be tested separately
- AHandle exceptional or invalid cases early
- BIncrease RAM
- CPrint the compiler
- DStore arrays
Correct Answer:
A) Handle exceptional or invalid cases early
- ACreate recursion
- BPrevent fall-through to the next case
- CRead input
- DInitialize variables
Correct Answer:
B) Prevent fall-through to the next case
- AA function returns a value
- BExecution continues into the next case without stopping
- CA variable changes type
- DThe monitor turns off
Correct Answer:
B) Execution continues into the next case without stopping
- AStore decimal fractions only
- BRemember whether a condition/event has occurred
- CReplace all loops
- DOpen files
Correct Answer:
B) Remember whether a condition/event has occurred
- AA device driver
- BOne of two values based on a condition
- COnly loop counts
- DObject files
Correct Answer:
B) One of two values based on a condition
- An % 2 == 0
- Bn / 2 == 0
- Cn > 2
- Dn += 2
Correct Answer:
A) n % 2 == 0
- AOnly arrays
- BSelection structures to respond to user choice
- CNo input
- DOnly comments
Correct Answer:
B) Selection structures to respond to user choice
- Aif-else ladder
- BSingle character variable only
- CFile pointer
- DLinker
Correct Answer:
A) if-else ladder
- AMaking them deeper
- BUsing clearer combined or structured conditions
- CRemoving all comparisons
- DAdding hardware
Correct Answer:
B) Using clearer combined or structured conditions
- Amarks is assigned 50
- Bmarks is at least 50
- Cmarks becomes Boolean
- Dmarks is less than 50
Correct Answer:
B) marks is at least 50
- APrinter model
- BTruth value of conditions
- CKeyboard color
- DFile size
Correct Answer:
B) Truth value of conditions
- ATyping speed
- BDiscount eligibility or admission criteria
- CProcessor manufacturing
- DNetwork cables
Correct Answer:
B) Discount eligibility or admission criteria
- AAlways executes
- BCan never execute because of program logic
- CContains a loop
- DReads input
Correct Answer:
B) Can never execute because of program logic
- ATranslate source code
- BRepeat a set of statements
- CStore images
- DDeclare constants
Correct Answer:
B) Repeat a set of statements
- AThe condition is true
- BThe condition is false
- CThe file is closed
- DThe compiler warns
Correct Answer:
A) The condition is true
- AThe number of iterations is known or controlled by a counter
- BNo repetition is needed
- CWriting comments
- DDeclaring arrays only
Correct Answer:
A) The number of iterations is known or controlled by a counter
- ANever checks a condition
- BExecutes the body at least once
- CCannot use conditions
- DRuns only ten times
Correct Answer:
B) Executes the body at least once
- AThe loop condition never becomes false
- BThe compiler is updated
- CThe output is correct
- DA function is declared
Correct Answer:
A) The loop condition never becomes false
- AOpen files
- BTrack progress of repetition
- CStore only strings
- DCompile modules
Correct Answer:
B) Track progress of repetition
- ABefore iterations begin
- BAfter the program ends
- CInside comments
- DInside the linker
Correct Answer:
A) Before iterations begin
- AAvoid all output
- BMove toward loop termination
- CIncrease syntax errors
- DCreate arrays
Correct Answer:
B) Move toward loop termination
- AA loop inside another loop
- BA loop with no body
- CA wrong program always
- DA file operation
Correct Answer:
A) A loop inside another loop
- Aprint
- Bbreak
- Cchar
- Dconst
Correct Answer:
B) break
- Acontinue
- Breturn type
- Ccompile
- Dlink
Correct Answer:
A) continue
- AThe user enters a special terminating value
- BThe CPU shuts down
- CA compiler warning appears
- DA library is missing
Correct Answer:
A) The user enters a special terminating value
- AStore final code only
- BKeep a running total
- CCreate comments
- DCount files
Correct Answer:
B) Keep a running total
- AMeasure monitor size
- BCount how many times something occurs
- CStore strings
- DAllocate memory
Correct Answer:
B) Count how many times something occurs
- ASentinel-controlled while loop
- BSwitch statement
- CArray declaration
- DFunction prototype
Correct Answer:
A) Sentinel-controlled while loop
- AWrong monitor brightness
- BIncorrect start or stop conditions
- CToo many comments
- DFile permissions
Correct Answer:
B) Incorrect start or stop conditions
- ANever matters
- BRemains true before and after each iteration
- CEnds the loop instantly
- DStores dynamic memory
Correct Answer:
B) Remains true before and after each iteration
- AFinding sum of 100 numbers
- BDeclaring one variable
- CWriting a comment
- DClosing a file once
Correct Answer:
A) Finding sum of 100 numbers
- AThe loop condition and updates
- BOnly variable names
- COnly comments
- DThe color theme
Correct Answer:
A) The loop condition and updates
- AAn accumulator multiplied each iteration
- BOnly input statements
- CA switch with no cases
- DA file pointer
Correct Answer:
A) An accumulator multiplied each iteration
- AAt least once
- BZero times
- CExactly once
- DInfinite times only
Correct Answer:
B) Zero times
- ABefore the outer loop starts
- BFor each iteration of the outer loop
- COnly once at the end
- DNever
Correct Answer:
B) For each iteration of the outer loop
- Afor loop
- Bswitch statement
- Ccomment block
- Dlinker phase
Correct Answer:
A) for loop
- AA loop until valid data is entered
- BOnly a constant
- CA pointer arithmetic rule
- DA header file
Correct Answer:
A) A loop until valid data is entered
- AReduces total randomly
- BAdds each new value to a running sum
- CCreates a new variable each time
- DEnds the loop
Correct Answer:
B) Adds each new value to a running sum
- AOnly one value always
- BMultiple values of the same general type under one name
- COnly characters
- DOnly files
Correct Answer:
B) Multiple values of the same general type under one name
- APassword
- BIndex or position
- CCompiler phase
- DFile extension
Correct Answer:
B) Index or position
- A1
- B0
- C-1
- DDepends only on hardware
Correct Answer:
B) 0
- ARandomly
- BContiguously
- COnly in ROM
- DInside comments
Correct Answer:
B) Contiguously
- AIts color
- BNumber of elements it can hold
- CIts address
- DIts data type only
Correct Answer:
B) Number of elements it can hold
- AAlways be safe
- BCause errors or undefined behavior
- CPrint the entire array
- DIncrease speed
Correct Answer:
B) Cause errors or undefined behavior
- ADeleting it
- BProcessing elements one by one
- CCompiling it
- DLinking libraries
Correct Answer:
B) Processing elements one by one
- AStore a collection of marks or prices
- BReplace all conditions
- CTranslate source code
- DControl the printer
Correct Answer:
A) Store a collection of marks or prices
- ADetermines safe iteration limits
- BChanges the keyboard layout
- CMakes all values equal
- DRemoves loops
Correct Answer:
A) Determines safe iteration limits
- AChecking elements one by one
- BUsing only recursion
- CComparing first and last only
- DSorting automatically
Correct Answer:
A) Checking elements one by one
- AThe correct index
- BA new compiler
- CA file stream
- DNo assignment
Correct Answer:
A) The correct index
- AOnly a sentence
- BA table or matrix of rows and columns
- CA single Boolean
- DA compiled executable
Correct Answer:
B) A table or matrix of rows and columns
- AOne row only
- BElement at row i and column j
- CEntire file
- DA function call
Correct Answer:
B) Element at row i and column j
- AColumns first always
- BAll columns of a row before moving to the next row
- CRandom cells only
- DOnly diagonal values
Correct Answer:
B) All columns of a row before moving to the next row
- AAppend/insert at end
- BCompile
- CDereference
- DDeallocate
Correct Answer:
A) Append/insert at end
- ARelated information is stored in separate arrays with matching indices
- BArrays are always unequal
- CFiles are merged
- DUsing recursion only
Correct Answer:
A) Related information is stored in separate arrays with matching indices
- AMultiplying all values
- BSumming values then dividing by count
- CTaking the first value
- DUsing a switch
Correct Answer:
B) Summing values then dividing by count
- AThe address/location of the first element
- BThe last element only
- CA compiler error
- DA string constant only
Correct Answer:
A) The address/location of the first element
- A3×5 or 5×3 two-dimensional array
- BSingle Boolean variable
- COnly one integer
- DA switch statement
Correct Answer:
A) 3×5 or 5×3 two-dimensional array
- AElement-wise processing or a built-in copy mechanism
- BNo effort
- COnly a comment
- DA linker
Correct Answer:
A) Element-wise processing or a built-in copy mechanism
- ADeleting repeated elements always
- BArranging elements in a desired order
- CPrinting one value
- DReading from file
Correct Answer:
B) Arranging elements in a desired order
Correct Answer:
C) n-1
- AAll rows have exactly same length
- BRows may have different lengths
- CIt stores only strings
- DIt cannot be traversed
Correct Answer:
B) Rows may have different lengths
- AThe monitor size
- BIts length/size information
- CA printer command
- DOnly comments
Correct Answer:
B) Its length/size information
- AAn array of counts
- BA single if statement
- COnly a string
- DNo memory
Correct Answer:
A) An array of counts
- ABreak a program into reusable modules
- BReplace all variables
- CStore images only
- DStop compilation
Correct Answer:
A) Break a program into reusable modules
- AOnly the function name
- BThe code that specifies what the function does
- COnly comments
- DOnly return statement
Correct Answer:
B) The code that specifies what the function does
- ADeleting the function
- BInvoking the function to execute
- CChanging hardware
- DSaving a file
Correct Answer:
B) Invoking the function to execute
- AA value supplied to printer
- BA variable in the function header receiving input
- CAn output window
- DA bug type
Correct Answer:
B) A variable in the function header receiving input
- AThe actual value passed to a function
- BThe same as comment
- CA reserved keyword always
- DA stack frame only
Correct Answer:
A) The actual value passed to a function
- AText written in comments
- BThe result sent back by a function
- CAlways an integer
- DThe function name
Correct Answer:
B) The result sent back by a function
- AReturns no explicit value
- BReturns many values
- CCannot be called
- DMust read files
Correct Answer:
A) Returns no explicit value
- ACode organization and reusability
- BSyntax errors
- CHardware temperature
- DTyping noise
Correct Answer:
A) Code organization and reusability
- AEverywhere in the program
- BOnly inside the function/block where they are declared
- COnly in libraries
- DOnly after compilation
Correct Answer:
B) Only inside the function/block where they are declared
- AWithin a wider program scope
- BOnly inside one loop
- COnly in comments
- DNever
Correct Answer:
A) Within a wider program scope
- ACalls itself directly or indirectly
- BContains no parameters
- CUses only arrays
- DHas no return value
Correct Answer:
A) Calls itself directly or indirectly
- AMakes recursion infinite
- BStops recursive calls eventually
- CStores global memory
- DCreates object code
Correct Answer:
B) Stops recursive calls eventually
- APrinters and scanners
- BActive function calls and local data
- COnly global variables
- DComments
Correct Answer:
B) Active function calls and local data
- ANew calls are added
- BFunctions finish and return back through previous calls
- CA file is opened
- DThe program is compiled
Correct Answer:
B) Functions finish and return back through previous calls
- AThe full algorithm always
- BThe function name, return type, and parameters before use
- CThe file path
- DThe monitor model
Correct Answer:
B) The function name, return type, and parameters before use
- AThe function receives a copy of the argument
- BThe original variable is always changed
- CNo memory is used
- DOnly arrays can be passed
Correct Answer:
A) The function receives a copy of the argument
- AIgnore the argument
- BModify the original variable
- CRun without parameters
- DAvoid return statements
Correct Answer:
B) Modify the original variable
- AProduces output without side effects for same input
- BUses global variables heavily
- CAlways reads files
- DNever returns a result
Correct Answer:
A) Produces output without side effects for same input
- AIncrease duplication
- BEncapsulate repeated tasks
- CPrevent testing
- DReplace loops
Correct Answer:
B) Encapsulate repeated tasks
- AOne giant function of 500 lines
- BSmall focused functions with clear purpose
- CA function with no name
- DOnly recursive functions
Correct Answer:
B) Small focused functions with clear purpose
- ARewrite formula everywhere
- BCreate a reusable function
- CUse only global variables
- DUse switch
Correct Answer:
B) Create a reusable function
- AArguments to be omitted when suitable default values exist
- BFunctions to return multiple types always
- CNo compilation
- DNo parameters ever
Correct Answer:
A) Arguments to be omitted when suitable default values exist
- AOne name can have multiple parameter variations
- BA function crashes the stack
- CFunctions use too much memory
- DThe linker is skipped
Correct Answer:
A) One name can have multiple parameter variations
- AVery deep or infinite recursion
- BToo many comments
- CUsing constants
- DReading one integer
Correct Answer:
A) Very deep or infinite recursion
- AHandle invalid cases clearly
- BAvoid all logic
- CReplace parameters
- DCreate dynamic memory
Correct Answer:
A) Handle invalid cases clearly
- AA single numeric value
- BA sequence of characters
- CA Boolean flag
- DA loop counter
Correct Answer:
B) A sequence of characters
- ADouble the length
- BMark the end of the string
- CStore the first character
- DBegin a file
Correct Answer:
B) Mark the end of the string
- AIts memory address
- BNumber of characters it contains
- CIts first index only
- DIts file size
Correct Answer:
B) Number of characters it contains
- AComparing two strings
- BJoining strings together
- CSorting characters
- DDeleting spaces
Correct Answer:
B) Joining strings together
- ATwo strings have same or ordered content
- BBoth are integers
- CThey use same memory size only
- DA file exists
Correct Answer:
A) Two strings have same or ordered content
- AA whole program
- BA part of a string
- CA compiler message
- DA type of pointer only
Correct Answer:
B) A part of a string
- ADeleting the string
- BProcessing characters one by one
- CConverting to float only
- DOpening a text file
Correct Answer:
B) Processing characters one by one
- ACounting vowels
- BAllocating CPU
- CLinking modules
- DChanging RAM type
Correct Answer:
A) Counting vowels
- AOnly letters
- BSpaces, tabs, and newline characters
- CNumbers only
- DComments only
Correct Answer:
B) Spaces, tabs, and newline characters
- ABuffer size limitations or leftover newline input
- BThe CPU disappears
- CFunctions stop existing
- DArrays cannot store chars
Correct Answer:
A) Buffer size limitations or leftover newline input
- ANumbers to files
- BUppercase letters to lowercase or vice versa
- CStrings to arrays only
- DPointers to references
Correct Answer:
B) Uppercase letters to lowercase or vice versa
- ADifferently backward
- BThe same forward and backward
- COnly left to right
- DOnly in binary
Correct Answer:
B) The same forward and backward
- ARandom order
- BDictionary order
- CReverse memory order
- DLoop order
Correct Answer:
B) Dictionary order
- AAll characters
- BUnwanted spaces from beginning/end
- CThe null terminator only
- DMiddle letters only
Correct Answer:
B) Unwanted spaces from beginning/end
- AReading until whitespace only
- BA method that accepts spaces
- COnly integer input
- DNo variables
Correct Answer:
B) A method that accepts spaces
- ACannot be changed
- BCan be modified after creation
- CExists only in files
- DIs always global
Correct Answer:
B) Can be modified after creation
- AOnly the last character
- BIndividual characters by position
- CThe compiler state
- DThe function return type
Correct Answer:
B) Individual characters by position
- AMemory allocation
- BSpecial character representations like newline
- CArray sorting
- DLogical operations
Correct Answer:
B) Special character representations like newline
- AOnly the first character
- BSpaces/separators and transitions between words
- COnly digits
- DThe linker output
Correct Answer:
B) Spaces/separators and transitions between words
- AUser names and messages
- BCPU clock speed
- CPrinter cables
- DHeat sink design
Correct Answer:
A) User names and messages
- AEnough storage space in the destination
- BOnly screen size
- COnly compiler version
- DNothing
Correct Answer:
A) Enough storage space in the destination
- AReading and extracting meaningful pieces from text
- BDeleting all text
- CCompiling comments
- DClosing files
Correct Answer:
A) Reading and extracting meaningful pieces from text
- ACharacter array or string object
- BOnly integer variable
- CSwitch case
- DA pointer to CPU
Correct Answer:
A) Character array or string object
- AA hidden bug
- BA character separating parts, such as comma
- CA loop index
- DA return type
Correct Answer:
B) A character separating parts, such as comma
- AA sorted list
- BThe characters in opposite order
- CA numeric result only
- DA file stream
Correct Answer:
B) The characters in opposite order
- AA character only
- BThe address of another variable
- CA compiled program
- DA loop condition
Correct Answer:
B) The address of another variable
- AGet the memory address of a variable
- BMultiply values
- CCreate files
- DDisplay output
Correct Answer:
A) Get the memory address of a variable
- ADestroying it
- BAccessing the value stored at the pointed address
- CCompiling it
- DComparing it with a string
Correct Answer:
B) Accessing the value stored at the pointed address
- APoints to valid data
- BDoes not currently point to a valid object
- CStores text
- DAlways points to zero index array
Correct Answer:
B) Does not currently point to a valid object
- ABe perfectly safe always
- BCause serious runtime errors
- CImprove efficiency
- DRemove syntax errors
Correct Answer:
B) Cause serious runtime errors
- AA function should modify the original argument efficiently
- BNo parameters exist
- COnly strings are used
- DWriting comments
Correct Answer:
A) A function should modify the original argument efficiently
- AAnother name for an existing variable
- BA new unrelated variable
- CA file descriptor
- DA keyword for loops
Correct Answer:
A) Another name for an existing variable
- AOnly keyboard type
- BThe size of the pointed data type
- CComment length
- DCompiler theme
Correct Answer:
B) The size of the pointed data type
- AA Boolean value
- BA pointer to its first element
- CA string literal
- DA file stream
Correct Answer:
B) A pointer to its first element
- APointer p becomes ten
- BThe value at address stored in p becomes 10
- Cp is compared with 10
- DA file is closed
Correct Answer:
B) The value at address stored in p becomes 10
- ADereference before initialization
- BInitialize pointers properly before use
- CPoint to random memory
- DIgnore null checks
Correct Answer:
B) Initialize pointers properly before use
- AA pointer to currently valid memory
- BA pointer to memory that is no longer valid
- CA pointer stored globally
- DA constant pointer only
Correct Answer:
B) A pointer to memory that is no longer valid
- AThe value pointed to cannot change
- BThe pointer address itself cannot change after initialization
- CIt stores only constants
- DIt cannot be dereferenced
Correct Answer:
B) The pointer address itself cannot change after initialization
- AThe pointed value should not be modified through that pointer
- BThe pointer cannot move
- CThe address is zero
- DThe data is dynamic
Correct Answer:
A) The pointed value should not be modified through that pointer
- ACan be null freely
- BUsually must refer to a valid object once bound
- CUse no memory
- DReplace arrays
Correct Answer:
B) Usually must refer to a valid object once bound
- AStoring an address for dynamic memory
- BAdding two integers
- CWriting a comment
- DDisplaying a menu
Correct Answer:
A) Storing an address for dynamic memory
- ASubtract numbers
- BAccess members through a pointer to a structure/object
- CCreate loops
- DOpen files
Correct Answer:
B) Access members through a pointer to a structure/object
- ATwo names refer to the same memory location
- BA variable becomes constant
- CA string is reversed
- DA file is renamed
Correct Answer:
A) Two names refer to the same memory location
- AIs recreated from scratch on every call only
- BRetains its value between function calls
- CExists only in arrays
- DCannot be initialized
Correct Answer:
B) Retains its value between function calls
- ALocal non-static variables
- BExecutable files
- CGlobal constants only
- DHeaders
Correct Answer:
A) Local non-static variables
- AProper initialization
- BDereferencing null or invalid pointers
- CUsing comments
- DDeclaring integers
Correct Answer:
B) Dereferencing null or invalid pointers
- APointers or references
- BOnly comments
- CA compiler flag
- DA string literal
Correct Answer:
A) Pointers or references
- AIndependent of pointed value content but dependent on platform
- BAlways 1 byte
- CAlways equal to array length
- DAlways larger than RAM
Correct Answer:
A) Independent of pointed value content but dependent on platform
- ANowhere
- BIn memory like other variables
- COnly in the CPU forever
- DInside the linker
Correct Answer:
B) In memory like other variables
- AThe pointer refers to dynamically allocated valid memory
- BThe value is printed
- CThe compiler is closed
- DThe monitor is on
Correct Answer:
A) The pointer refers to dynamically allocated valid memory
- AOnly at compile time
- BAt runtime as needed
- COnly from ROM
- DOnly by the linker
Correct Answer:
B) At runtime as needed
- AThe required size is known exactly at compile time always
- BData size is determined during execution
- CNo variables exist
- DOnly integers are used
Correct Answer:
B) Data size is determined during execution
- AAllocated memory is not released after it is no longer needed
- BA file is renamed
- CThe compiler optimizes code
- DA loop ends
Correct Answer:
A) Allocated memory is not released after it is no longer needed
- AWaste resources
- BReturn memory to the system
- CCreate strings
- DStart recursion
Correct Answer:
B) Return memory to the system
- AThe pointer becomes longer
- BUsing the freed memory again through a dangling pointer
- CComments disappear
- DArrays become 2D
Correct Answer:
B) Using the freed memory again through a dangling pointer
- AArray size must change or be decided at runtime
- BThe size is always fixed and tiny
- CNo loops are used
- DOnly chars are stored
Correct Answer:
A) Array size must change or be decided at runtime
- ATemporary CPU storage only
- BStoring data permanently on secondary storage
- CCompiling code
- DDrawing flowcharts
Correct Answer:
B) Storing data permanently on secondary storage
- ACreate new processor instructions
- BRetrieve data from an existing file
- COnly write data
- DDelete memory
Correct Answer:
B) Retrieve data from an existing file
- ALeaves contents unchanged always
- BCreates a new file or overwrites existing content
- CReads without change only
- DRuns the compiler
Correct Answer:
B) Creates a new file or overwrites existing content
- AAdd new data at the end of an existing file
- BRead only the first line
- CDelete the file
- DAllocate RAM
Correct Answer:
A) Add new data at the end of an existing file
- ACheck that the file opened successfully
- BRestart the computer
- CCreate recursion
- DSort arrays
Correct Answer:
A) Check that the file opened successfully
- AEnd of File
- BError on Format
- CEntry of Function
- DExecution of File
Correct Answer:
A) End of File
- AHuman-readable characters
- BRaw machine addresses only
- CGPU signals
- DPointers only
Correct Answer:
A) Human-readable characters
- ACannot store data
- BStore raw bytes in compact form
- CUse only strings
- DNeed no opening
Correct Answer:
B) Store raw bytes in compact form
- AThe current position and state during file operations
- BOnly file size
- COnly variable names
- DThe compiler version
Correct Answer:
A) The current position and state during file operations
- AA loop until end of file or read failure
- BA switch with no cases
- COnly recursion
- DNo variables
Correct Answer:
A) A loop until end of file or read failure
- APersistent reports and saved data
- BReducing algorithm logic
- CDeleting memory
- DAvoiding all debugging
Correct Answer:
A) Persistent reports and saved data
- AMay flush buffers and release resources
- BCreates a syntax error
- CDeletes all data automatically
- DPrevents any output
Correct Answer:
A) May flush buffers and release resources
- ATurning structured data into a storable/transmittable format
- BSorting only numbers
- CCreating arrays
- DCompiling libraries
Correct Answer:
A) Turning structured data into a storable/transmittable format
- ABlind trust
- BBasic validation and error handling
- CPointer arithmetic only
- DIgnoring existence
Correct Answer:
B) Basic validation and error handling
- APointers
- BComments
- CSwitch labels
- DOnly constants
Correct Answer:
A) Pointers
- AMoving/copying existing data to a new location
- BDeleting all variables
- CUsing only files
- DChanging comments
Correct Answer:
A) Moving/copying existing data to a new location
- ASaving student marks or inventory records
- BCooling the CPU
- CProducing machine code
- DReplacing operators
Correct Answer:
A) Saving student marks or inventory records
- AParsing according to the stored format
- BOnly a monitor
- CNo loops
- DNo variables
Correct Answer:
A) Parsing according to the stored format
- ABuffered data not being fully written
- BImproved security
- CNo effect ever
- DCompiler warnings only
Correct Answer:
A) Buffered data not being fully written
- ASelection logic
- BOnly file I/O
- COnly recursion
- DA pointer to char
Correct Answer:
A) Selection logic
- AThe product of marks
- BThe sum of marks and divide by count
- COnly the maximum
- DOnly the minimum
Correct Answer:
B) The sum of marks and divide by count
- AA counter and repetition
- BOnly a switch
- CNo variables
- DOnly dynamic memory
Correct Answer:
A) A counter and repetition
- ASelection structure
- BPointer arithmetic
- CFile append only
- DStatic memory
Correct Answer:
A) Selection structure
- ALoop with remainder and division
- BOnly arrays
- COnly recursion always
- DFile reading
Correct Answer:
A) Loop with remainder and division
- Aif-else ranges
- BOnly a compiler flag
- COnly string trimming
- DPointer subtraction
Correct Answer:
A) if-else ranges
- ASpecific divisibility conditions
- BOnly addition
- COnly file mode
- DA random choice
Correct Answer:
A) Specific divisibility conditions
- AAn array of counters
- BOnly one Boolean
- CNo loops
- DOnly comments
Correct Answer:
A) An array of counters
- AUnsorted
- BSorted
- CStored in a file only
- DIn two dimensions
Correct Answer:
B) Sorted
- AData is unsorted or small
- BData is always huge and sorted
- CNo comparison is needed
- DOnly files are used
Correct Answer:
A) Data is unsorted or small
- AExecution count and logic correctness
- BOnly variable names
- COnly font style
- DLinker options
Correct Answer:
A) Execution count and logic correctness
- ARepresentative input and expected output
- BOnly variable declarations
- COnly comments
- DA new compiler
Correct Answer:
A) Representative input and expected output
- ARandom colors
- BValues near the limits of valid input
- COnly strings
- DOnly null pointers
Correct Answer:
B) Values near the limits of valid input
- AWhether amount meets valid conditions such as balance and limits
- BOnly output color
- CThe file extension
- DThe array index
Correct Answer:
A) Whether amount meets valid conditions such as balance and limits
- ACurrent item with previous or next item
- BOnly the first and last item
- COnly file names
- DOnly pointers
Correct Answer:
A) Current item with previous or next item
- AA larger value is found
- BA smaller value is found
- CThe loop ends
- DA file opens
Correct Answer:
A) A larger value is found
- ANested loops
- BSingle if statement
- COnly recursion
- DString concatenation
Correct Answer:
A) Nested loops
- APersist item names, quantities, and prices
- BIncrease CPU cores
- CReplace all functions
- DAvoid input
Correct Answer:
A) Persist item names, quantities, and prices
- AModular design
- BMachine language
- COnly dynamic memory
- DA syntax error
Correct Answer:
A) Modular design
- ATrace variable values through iterations
- BDelete all loops
- CRewrite in assembly immediately
- DIgnore test data
Correct Answer:
A) Trace variable values through iterations
- AA counted loop with condition
- BOnly arrays
- COnly a pointer
- DA static file
Correct Answer:
A) A counted loop with condition
- ARepetition and a sentinel value
- BNo input
- COnly recursion
- DOnly switch
Correct Answer:
A) Repetition and a sentinel value
- AReuse tested functions for repeated tasks
- BCopy-paste logic everywhere
- CAvoid meaningful names
- DIgnore edge cases
Correct Answer:
A) Reuse tested functions for repeated tasks
- AA missed edge case
- BThe monitor brightness
- CThe linker version
- DA comment format
Correct Answer:
A) A missed edge case
- ACorrect logic, testing, and readable implementation
- BOnly a final answer without code
- COnly diagrams without logic
- DOnly file output
Correct Answer:
A) Correct logic, testing, and readable implementation