Introduction To C++
Introduction To C++
College of Engineering
Computer Engineering Department
Experiment No. 2
Introduction to C++ Programming
Score
Submitted by:
Robles, Kzenette Anne M.
Thursday/ CL5
Submitted to
Engr. Jordan Vhane D. Sardalla
Faculty Member
Date Performed
01-31-2019
Date Submitted
02-07-2019
I. Objectives
1. To be familiarized to the Turbo C application.
2. To be familiarized with the structure of C++ programming.
3. To be able to understand a simple C++ program.
4. To be able to utilize the Turbo C application to create a simple C++ program.
II. Discussion
C++ Programming
The C++ programming language has a history going back to 1979, when Bjarne Stroustrup
was doing work for his Ph.D. thesis. He began work on "C with Classes", which as the name
implies was meant to be a superset of the C language. His goal was to add object-oriented
programming into the C language, which was and still is a language well-respected for its
portability without sacrificing speed or low-level functionality.
His language included classes, basic inheritance, inlining, default function arguments, and
strong type checking in addition to all the features of the C language. The first C with Classes
compiler was called Cfront, which was derived from a C compiler called CPre. It was a program
designed to translate C with Classes code to ordinary C.
In 1983, the name of the language was changed from C with Classes to C++. The ++
operator in the C language is an operator for incrementing a variable, which gives some insight
into how Stroustrup regarded the language. Many new features were added around this time, the
most notable of which are virtual functions, function overloading, references with the & symbol,
the const keyword, and single-line comments using two forward slashes.
In 1985, C++ was implemented as a commercial product. The language was not officially
standardized yet. The language was updated again in 1989 to include protected and static members,
as well as an inheritance from several classes.
In 1990, Turbo C++ was released as a commercial product. Turbo C++ added a lot of
additional libraries which have had a considerable impact on C++'s development.
In 1998, the C++ standards committee published the first international standard for C++
ISO/IEC 14882:1998, which is informally known as C++98. The Standard Template Library,
which began its conceptual development in 1979, was also included. In 2003, the committee
responded to multiple problems that were reported with their 1998 standard and revised it
accordingly. The changed language was named C++03.
In mid-2011, the new C++ standard (C++11) was finished. The new features included
Regex support, a randomization library, a new C++ time library, atomics support, a standard
threading library, a new for loop syntax providing functionality similar to for each loops in certain
other languages, the auto keyword, new container classes, better support for unions and array-
initialization lists and variadic templates. [1]
Turbo C Application
Turbo C++ is a discontinued C++ compiler and integrated development environment and
computer language originally from Borland. Most recently it was distributed by Embarcadero
Technologies, which acquired all of Borland's compiler tools with the purchase of its CodeGear
division in 2008. The original Turbo C++ product line was put on hold after 1994 and was revived
in 2006 as an introductory-level IDE, essentially a stripped-down version of their flagship
C++Builder. Turbo C++ 2006 was released on September 5, 2006 and was available in 'Explorer'
and 'Professional' editions. The Explorer edition was free to download and distribute while the
Professional edition was a commercial product. In October 2009 Embarcadero Technologies
discontinued support of its 2006 C++ editions. As such, the Explorer edition is no longer available
for download and the Professional edition is no longer available for purchase from Embarcadero
Technologies. [2]
III. Instructions
Example:
//#include<iostream.h>
/*
clrscr();
cout<<”Put any statement here”;
getch();
*/
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
cout<<”Put any statement here”;
getch();
}
1. The compiler after inputting the code above and saving the file with the correct filename.
2. The console after running the program.
3. The compiler when the code below is commented out.
#include<iostream.h>
4. The compiler when the word main on the code below is replaced to man.
void main()
5. The console when the code below is commented out.
clrscr();
6. The console when the code below is commented out.
cout<<”Put any statement here”;
7. The console when the code below is commented out.
getch();
8. The compiler when the code below is commented out.
}