Introduction to C++ .

Introduction

UNIT 1.

INTRODUCTION TO C++.TOPICS TO BE COVERED…

1.What is C++?

2.Properties of C++?

3.What is header file ? And why name space is used.

ANSWER to some of The BURNING questions in mind…

  • Oh no… Why another Programming Language ?
  • What would we do with it, we already know C ? Difference between C and C++?
  • Will it really help improve my programming skills?

INTRODUCTION TO C++.

  1. C++ is expanded version of C , or in other words it is Superset of C.
  2. It was developed by Bzarne Stroustrup in 1979 at AT&T Bell Laboratories.
  3. Initially Bzarne Stroustrup kept its name as C with Classes, later on(by 1983)  it was changed to C++.

FEATURES OF C++.

1.It is a Middle Level Programming Language.

2.It is Object Oriented Language which uses the concept of Object and classes to relate with the real world entities. Or in simple words we can say that it  can bind the real word entities into classes and Object.

3.C++ is Block Structured Programming language(as in C++ we can create function inside function)but in C we cannot create a function inside function).

4.Ease for programmers to create large programs with clarity.

5.Easily Maintainable.

6.Extensible.

7.Reuseablity

8.Secure

9.Portable and User Friendly.

 

DIFFERENCE BETWEEN C AND C++.

C C++
1. Developed by Dennis Ritchie at AT&T Bell Laboratory. Developed by Bjarne Stroustrup at AT&T Bell Laboratory in 1979.
2. It is procedural programming Language. It is procedural and Object Oriented  programming Language.
3. It is not Block Structured ,in c we cannot create a function inside function). C++ is Block Structured Programming language(as in C++ we can create function inside function)
4. Uses Top Down Approach. Uses Bottom Up Approach.
5 Does not support Information Hiding, as in C data can easily move from function to function. Supports Data Hiding (Encapsulation).Here data and functions are encapsulated together in form of object.
6 Does not support Encapsulation , it means data can be accessed or manipulated by outside Code. Support  Encapsulation , it means data cannot be accessed or manipulated by outside Code.
7 Does not support:·         Polymorphism·         Abstraction

·         Dynamic binding

·         Operator overloading

·         Inheritance

·         Exception handling

Supports:·         Polymorphism·         Abstraction

·         Dynamic binding

·         Operator overloading

·         Inheritance

·         Exception handling

8. calloc() and malloc() functions are used for Dynamic memory Allocation and Free() function is used to de allocate memory. In C++ new operator is used for memory allocation and delete operator  is used for de memory allocation.
9. We Cannot make Actual parameters default in c. Actual Parameters can be made  default.
10. Access Specifiers Public , Private and Protected are not used in C. Use of Access Specifiers Public , Private and Protected are  used in C++ to make the data members and methods more secure.

 

  • Oh no… Why another Programming Language ?

Because C++ has following advantages:

  • Improves on many of C’s features
  • Has object-oriented capabilities
  • Increases software quality and re-usability.
  • Is Extensible and Portable.
  • Has object-oriented capabilities.
  • Increases software quality and re-usability.

Leave a Comment