INTRODUCTION C,C++
C++ is used by programmers to create computer software. It is used to create general systems software, drivers for various computer devices, software for servers and software for specific applications and also widely used in the creation of video games.
C++ is used by many programmers of different types and coming from different fields. C++ is mostly used to write device driver programs, system software, and applications that depend on direct hardware manipulation under real-time constraints. It is also used to teach the basics of object-oriented features because it is simple and is also used in the fields of research. Also, many primary user interfaces and system files of Windows and Macintosh are written using C++. So, C++ is really a popular, strong and frequently used programming language of this modern programming era.
Definition – What does C++ Programming Language mean?
C++ is a general-purpose object-oriented programming (OOP) language, developed by Bjarne Stroustrup, and is an extension of the C language. It is therefore possible to code C++ in a “C style” or “object-oriented style.” In certain scenarios, it can be coded in either way and is thus an effective example of a hybrid language.
C++ is considered to be an intermediate-level language, as it encapsulates both high- and low-level language features. Initially, the language was called “C with classes” as it had all the properties of the C language with an additional concept of “classes.” However, it was renamed C++ in 1983.
C and C++ Advantageous
- Powerful and flexible language – What can be achieved is only limited by your imagination. It is used for Operating System, compilers, parsers, interpreters, word processors, search engine and graphic programs.
- Portable programming language – C program written for one computer system (an IBM PC, for example) can be compiled and run on another system (a DEC VAX System perhaps with little or no modification).
- Is a language of less keyword – Handful of terms called keywords in which the language’s functionality is built. A lot of keywords doesn’t mean more powerful than C.
- Modular – Written in routines called functions and classes (C++), can be reused in other applications or programs.
- Preferred by professional programmers – So, a variety of C/C++ resources and helpful supports are widely available.
- Standardized – Many standards have been documented, maintained and updated for C and C++ as standard references for solving the portability and many other issues. For example, the latest version of standard C++ is C++17 and later C++20 (“C++20“) and the older version is C++03.
Very Basic C and C++ Program Development
- Computer program is designed to solve problem. Nowadays it makes ease a lot of our works.
- The simple steps to find a solution to problems are the same steps used to write a program and basically can be defined as follows:
- Define the problem.
- Devise a plan to solve it.
- Implement the plan.
- Test the result to see whether the problem is solved.
- When creating a program in C/C++:
- Determine the objectives of the program.
- Decide which method the program will use to solve the problem while preparing the pseudo code or flowchart.
- Translate this pseudo-code or flowchart into a computer program using the C/C++ language.
- Run and test the program.
C++ Object Oriented Programming
- C++ is a C superset was developed by Bjarne Stroustrup at Bell Laboratories (some call advanced C) and the ANSI C++ (ISO/IEC C++) standard version is also already available. From ISO/IEC standard, C++ evolved from C++98, C++03 and the latest isC++20.
- C++ provides a number of features that spruce up the C language mainly in the object-oriented programming aspects and data type safety (which lack in C language). Though if you have studied the C++, you will find that the type safety of the C++ also not so safe :o) actually the secure codes depend on the programmers themselves.
- Object are essentially reusable software components that model items in the real world.
- Using a modular, object-oriented design and implementation, can speed up the program development and make the same software development group, up to many times more productive than the conventional programming techniques.
- Then, the evolution of the C++ continues with the introduction of the Standard Template Library (STL). STL deal mainly with data structure processing and have introduced the using of C++ STL templates. From procedural programming to object oriented programming, STL has introduced generic programming.
- Then we have Common Language Runtime (CLR) type of the programming language, something like Java (the Java Virtual Machine – JVM) implemented for example, in the .NET Framework programming.
C++:
C++ (pronounced see plus plus) was developed by Bjarne Stroustrup at Bell Labs as an extension to C, starting in 1979. C++ adds many new features to the C language, and is perhaps best thought of as a superset of C, though this is not strictly true (as C99 introduced a few features that do not exist in C++). C++’s claim to fame results primarily from the fact that it is an object-oriented language. As for what an object is and how it differs from traditional programming methods, well, we’ll cover that in chapter 8 (Basic object-oriented programming).
C++ was ratified in 1998 by the ISO committee, and again in 2003 (called C++03). Three major updates to the C++ language (C++11, C++14, and C++17, ratified in 2011, 2014, and 2017 accordingly) have been made since then, adding additional functionality to the language. C++11 in particular added a huge number of new capabilities to the language. Some relevant features from these updates will be discussed in these tutorials. Future updates to the language are in active considera
C and C++’s philosophy
The underlying design philosophy of C and C++ can be summed up as “trust the programmer” — which is both wonderful and dangerous. C++ is designed to allow the programmer a high degree of freedom to do what they want. However, this also means the language often won’t stop you from doing things that don’t make sense, because it will assume you’re doing so for some reason it doesn’t understand. There are quite a few pitfalls that new programmers are likely to fall into if caught unaware. This is one of the primary reasons why knowing what you shouldn’t do in C/C++ is almost as important as knowing what you should do.