INTRODUCTION OF C++
C++ was invented by Bjarne Stroustrup in 1979, at Bell Laboratories in Murray Hill, New Jersey. He initially called the new language “C with Classes ” However in 1983 the name was changed to C++ Stroustrup built C++ on the foundation of C including all of C’s features attributes and benefits
C++ support all the functionality of Object Oriented Programming Language.
There are many different types of programming languages.
1. machine languages,
2. assembly languages,
3. procedure-oriented languages,
4. object-oriented languages.
1. MACHINE LANGUAGE
Machine language is a language that uses bits/bytes to form instructions to communicate with a computer. Each computer has its own instruction set (set of instructions it understands).
Machine language uses binary numbering, which is a number system using 1's and 0's to represent data (base two). Each digit in binary is commonly called a bit (short for binary digit); and eight bits form a byte. Each character entered into the computer will be represented by a unique code consisting of 1's and 0's.
ASCII (American Standard Code for Information Interchange) is a popular data representation code using bits to represent numbers, letters, and symbols.
2. ASSEMBLY LANGUAGE
Assembly language is a language using mnemonics in place of 1's and 0's. Mnemonics are symbols used to represent the actual machine language instructions. Since the only instructions that the computer understands are machine language instructions, an assembler is required to convert the assembly language code to machine code before being executed by the computer.
3. PROCEDURE ORIENTED LANGUAGE
Procedure-oriented languages allow the programmer to use instructions that more closely resemble the English language.
4. OBJECT ORIENTED LANGUAGE
OOPs will discuss on next page
C++ provides several libraries of pre-written functions for you that perform frequently needed operations. You access these libraries by placing #include statements at the top of your source code file.
The most commonly used libraries are listed below.
iostream provides cin and cout
cmath provides math functions like sin(), sqrt() and log10().
cstdlib provides miscellaneous routines like rand().
ctime provides function for manipulating time.
string allows use of the string type
vector allows use of the vector type
list allows use of the list type