M3S1 Part 1 Flashcards
is an extension of C
C++
a statically typed, compiled, general-purpose, casesensitive, free-form programming language that supports
procedural, object-oriented, and generic programming.
C++
C++ is regarded as a
middle-level language
comprises
a combination of both high-level and low-level language
features.
C++
C++ was developed by
Bjarne
Stroustrup starting in 1979 at Bell Labs
in Murray Hill, New Jersey,
C++ og name
C with Classes
when was C with Classes get renamed into C++
1983
Pre-processor directive
#include using namespace std;
Comment
//This is my first program in C++
main() function
int main()
Start of the program
{
Output statement
cout
Return
return 0;
End of the program
}
C++ Basic Structure:
- Pre-processor directive
- Comment
- main() function
- Start of the program
- Output statement
- Return
- End of the program
are directives for
the preprocessor.
Lines beginning with a hash or pound sign (#)
They tell the compiler to preprocess the source
code before compiling.
preprocessor directive
No white space should appear before the
#
is a semi colon required at the end of a preprocessor directive?
no
instructs the compiler to add the
contents of an include file into your
program during compilation.
include
includes the declarations of the basic
standard input-output library in C++
include
basic
standard input-output library in C++
cin, cout
defines various mathematical functions and one
macro.
include
The math.h header
is used to define symbolic
names and constants.
define directive
All lines beginning with two slash signs (//) are considered as a WHAT and do not have any effect on the behavior of the program.
comment line