Selasa, 30 Juni 2020

What Is The C++ Programming Language

What Is The C++ Programming Language

C++ is a computer programming language created by Bjarne Stroustrup, which is a development of the C language developed at Bell Labs (Dennis Ritchie) in the early 1970's, the language was derived from the previous language, namely B.

In the beginning, the language was designed as a programming language run on Unix systems. In its development, the ANSI (American National Standards Institute) version of the C programming language became the dominant version, although these versions are now seldom used in system and network development as well as for embedded systems. Bjarne Stroustrup at Bell Labs first developed C++ in the early 1980's. To support features in C++, built-in efficiency and support systems for low level coding.

in C++ added new concepts such as classes with properties such as inheritance and overloading. One of the most fundamental differences with the C language is the support of object-oriented programming.

Standardization
Year     C++ Standard                Informal Name
2011   ISO/IEC 14882:2011           C++ 11
2007   ISO/IEC TR 19768:2007    C + + TR1
2003   ISO/IEC 14882:2003          C++ 03
1998   ISO/IEC 14882:1998          C++ 98

In 1998, the C++ Standard Committee (ISO/IEC JTC1/SC22/WG21 Working Group) issued an ISO/IEC 14882:1998 International Standard which was used for several years. In the year 2003 was released the corrected version, ISO/IEC 14882:2003. In the year 2005, a technical report called "Library Technical Report 1" (often known as TR1) was released. The latest revision of the C++ standard is C + 11 (formerly known as C++ 0x) has been approved by ISO/IEC on August 12, 2011 and has been published as 14882:11.

C++ Program Examples

Example of a simple C++ program for Hello World using the C++ Basic library can be seen below:
8
#include < iostream >
using namespace Std;
int main ()
{
cout < < "Hello World" < < Endl;
return 0;
}

Description

First line:
#include < iostream. h >
As part of the compiler process, the compiler of C++ runs a program called preprocessor pre-processor having the ability to add and remove code from the source. In #include section tells the preprocessor to include the code of the iostream, the iostream file contains declarations for the various functions required by the software, or the classes required.

Second row:
int main ()
This statement declares a primary function, that a C++ program can contain many functions, which should always have a main function. Functions are modules that contain codes to solve certain problems. The word Void indicates an unqualified play function.

Third row:
{
Opening curly brackets signify the start of the program.
Fourth row:
STD:: cout < < "Hello world\n";
Cout is an object of the standard C++ software library used to print strings to a standard output device, which is usually a computer screen, the compiler connects the code from that standard software library with code that has been written to get the executable result. Sign
\n
is a modifier format used to switch rows after displaying the string, if there are other cout in the program, then the accompanying string will be written on the bottom row. Fifth row:
}

Closing curly brackets signify the end of the program.
Basic data types [
To store a required variable a specific place in the computer's memory. The large and type of variables inside the standard C++ program are specified as follows. 10
Name of range size description
Char alphabets/characters or for small integers 1 byte signed:-128 to 127
Unsigned: 0 to 255
short int (short) integers with short range 2 bytes signed:-32768 to 32767
Unsigned: 0 to 65535
int integers 4 bytes Signed:-2147483648 to 2147483647
Unsigned: 0 to 4294967295
long int (long) Integer with a length range of 4 bytes signed:-2147483648 to 2147483647
Unsigned: 0 to 4294967295
Boolean bool, can be either true or false, I byte true or False
Float number with floating point (number of Numbers) 4 bytes 3.4 E +/-38 (7 digits)
Double numbers with double accuracy 8 bytes 1.7 E +/-308 (15 digits)
Long double number of numbers with double accuracy length 8 bytes 1.7 E +/-308 (15 digits)
wchar_t character width, commonly used for Unicode characters 2 bytes 1 character wide

Advantages and disadvantages of C++ programming languages

Excess C++ programming Languages:
Available in almost all types of computers,
Faster C++ execution Process,
A little keyword, just around 48 keywords,
Flexible and also portable for all types of computers,
Middle Level language,
The language is structured, and includes object-oriented programming (OOP) programming languages,
Code that is reuseable (reusable) on other projects, of course with libraries and header files,
Can create a high quality graphic processor application,
function and class library support so that it can be used for macro application creation,
Languages that already have an ANSI standard that can be used across multiple platforms.

Disadvantages of C++ programming languages:
For beginners are usually hard to use pointers,
Case sensitive, which is different in the use of uppercase and lowercase letters,
Make programming with C++ language difficult,
The C++ implementation is very slight,
Many operators as well as flexibility in writing programs that confuse beginners.
Differences between C and C++ programming languages

As I've previously alluded to, where C++ itself is a derived language that has been refined from the C language.

The differences from the C and C++ languages are as follows:
The discoverer of C language is Bell Telephone while C++ is Bjarne Stroustrup,
C++ 's scope is larger, so C++ itself can run C language while the C language cannot run C++,
The C language is included in the procedural programming language while C++ includes OOP (object-oriented programming) programming,
The difference in data viewing, for the C language, data belongs to separate and free entities such as procedures and functions. As for C++ as described above.

C++ language supports polymorphism, Inheritance and encapsulation, while the C language does not.
The difference in data manipulation by outside code, the C++ language supports private/protected information, while the C language does.

C++ language supports operator overloading, structured functions, variable referrals, virtual functions, while C language is not.
And other is in some respects such as: Standard template libraries, exception handling, type data, and writing.

C++ compiler
Dev C++
Code Blocks
Acorn C/C++
Borland C++
C++/CX
C++ Builder
Cfront
Clang
CodeWarrior
Comeau C/C++
ConceptGCC
Digital Mars
GNU Compiler Collection
HP aC + +
IBM XL C++
Intel C++ Compiler
MinGW
Norcroft C Compiler
Open64
Oracle Solaris Studio
PathScale
The Portland Group
ROSE (Compiler Framework)
Shed Skin
The Softune
TenDRA Compiler
THINK C
Turbo C++
Visual C++
IBM VisualAge
Watcom C/C++ Compiler
Zortech

C++ family of programming languages
Algorithmic skeleton
C++/CLI
C++/CX
Charm + +
Embedded C++
Felix (programming language)
Intel Array Building Blocks
Intel Parallel Studio
Managed Extensions for C++
R + +
Sieve C++ Parallel Programming System
Threading Building Blocks
ΜC + +

Tidak ada komentar:

Posting Komentar