Lab Report
Question
1. How to
a. Compilation
process.
è Preprocessing: frequently, the source code you type into a program is
incomplete and invalid. Consider the following:
#include <iostream>
int main()
{
std::cout<<"Hello World!\n";
return 0;
}
b. Execute the program.
Example :
è
Initiate execution (as task #0) of the program named assembly,
with execution to continue indefinitely (that is, until execution is aborted, a
HALT instruction is executed, or a run-time error occurs):
EXECUTE 0 assembly, -1
Initiate execution, with program task #2, of the program named
test. The parameter values 1 and 2 are passed to the program.
EXECUTE 2 test(1,2)
The following program segment shows how an application program can
be initiated from another application program (the ABORT and CYCLE.END program
instructions are used to make sure the specified program task is not already
active):
ABORT 3 ;Abort any program already active
CYCLE.END 3
;Wait for execution to abort
EXECUTE 3 new.program
;Start up the new program
2. What
is C++ Programming
C++ is an "object
oriented" programming language created by Bjarne Stroustrup and released
in 1985. It implements "data abstraction" using a concept called
"classes", along with other features to allow object-oriented
programming. Parts of the C++ program are easily reusable and extensible;
existing code is easily modifiable without actually having to change the code.
C++ adds a concept called "operator overloading" not seen in the
earlier OOP languages and it makes the creation of libraries much cleaner.
C++ maintains aspects of the C programming language, yet has features
which simplify memory management. Additionally, some of the features of C++
allow low-level access to memory but also contain high level features.
C++ could be considered a superset of C. C programs will run in C++
compilers. C uses structured programming concepts and techniques while C++ uses
object oriented programming and classes which focus on data. Read about the History
of C and also about
the History of C++.
No comments:
Post a Comment