1/29
Comprehensive practice questions covering the introductory concepts of C++ program development, software categories, language evolution, and debugging.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
According to the transcript, what is a Program?
Instructions in computer memory which the computer follows to perform a task.
How is a Programmer defined?
A person who writes instructions (programs) to make a computer perform a task.
What is the definition of Software?
A collection of programs and data that instruct the computer what to do.
What are the two categories of software mentioned in the notes?
System software (Operating Systems like Windows, UNIX, Linux) and Application software (Word processing, games).
In programming, what does the term Syntax refer to?
The spelling and grammars of a programming language.
What is an Algorithm?
A sequence of instructions written for a computer to solve a problem.
What are the three categories of computer languages?
Machine language, Symbolic/Assembly language, and High-level language.
In which decade did Machine Languages originate?
The 1940s.
In which decade did High-Level Languages originate?
The 1960s.
Describe Machine Language instructions.
They consist of binary numbers (0s and 1s) and are platform-dependent.
What is the function of an Assembler?
To translate a program written in assembly language into machine language for execution.
What defines a High-Level Language?
It uses English-like codes and mathematical operators, and it is platform-independent.
What is a Compiler used for?
To translate a program written in a high-level language to machine language.
What are the five steps in the compilation process of a C++ program?
1) Editor (Source code), 2) Compiler (Object code), 3) Linker (Link with libraries), 4) Loader (Put in memory), 5) CPU (Ready to run).
What are the four steps of Program Development?
What tools can be used to design the logic of a program during the 'Develop a solution' phase?
Structure chart, Pseudocode, and Flowchart.
What are the formulas for finding the area and perimeter of a rectangle in the Example 1-1?
perimeter=2×(length+width) and area=length×width
What is a Structure Chart?
A hierarchy chart that shows the functional flow through the program and how it is broken into logical steps.
What is the purpose of Pseudocode?
To use English words to convey program logic and algorithm steps.
What does a Flowchart use to represent the logical flow of data?
Standard graphical symbols.
What are 'Bugs' in programming?
Errors, also known as exceptions, that occur during compilation or execution.
Define Syntax Errors.
Code violations identified during compilation, such as a missing semicolon (;) or an undefined variable.
Define Run-time Errors.
Illegal operations that occur during execution, such as dividing a number by zero or opening a non-existing file.
What are Logic Errors?
Errors where the program passes syntax and run-time checks but produces false results due to a flawed algorithm.
In C++, what is the purpose of the line "#include
It is a preprocessor directive that allows input and output.
What is the meaning of "int main()" in a C++ program?
It is the command indicating where program execution begins.
In C++, what are the symbols for the stream insertion and stream extraction operators?
Insertion is << (used with cout) and extraction is >> (used with cin).
What does the escape sequence "\n" represent?
It inserts a new line.
In a C++ return statement, what does the value 0 usually indicate?
That the program has terminated successfully.
According to 'Good Programming Habits', what should programmers use for identification?
Meaningful identifiers.