Notes 1
Notes 1
C and C++
Difference between C and C++
3. C does not have classes and objects 3. C++ have classes and objects
5. Major Input output functions are 5. Major Input output functions are
available in <Stdio.h> header file. available in <iostream.h> header file.
Difference between C and C++
Sr. No C Language Sr. C++ Language
10. Inline functions are not available in C 10. Inline functions are available.
Difference between C and C++
Sr. No C Language Sr. C++ Language
11. C is a middle level language. 11. C++ is high level language.
12. It does not support reusability 12. It supports reusability of code(Using
Inheritance).
13. It can not model real world applications 13. It is used for real world modeling.
15. It does not support the concept of 15. It successfully implements the
polymorphism. concept of polymorphism in the
form of function and operator
overloading.
Difference between C and C++
Sr. No C Language Sr. C++ Language
16. File Extension in C is .c 16 File Extension in C++ is CPP
17. In C Language :- 17. In C++ Language:-
Basic Function used for Input scanf() Basic Function used for Input cin>>
Basic Function used for Output printf() Basic Function used for Output cout<<
Basic Concepts of
Object-Oriented Programming
Data
Object Classes Abstraction and Inheritance
Encapsulation
Polymorphism
Dynamic Message
Binding Passing
Object
Objects contain data and code to manipulate that data. The entire set
of data and code of an objet can be made a user-defined data type
with the help of a class. In fact, objects are variables of the type class.
Once a class has been defined, we can create any number of objects
belonging to that class. Each object is associated with the data of type
class with which they are created. A class is thus a collection of objects
of similar type. For example mango, apple and orange are members of
the class fruit.
Classes are user-defined data types and behave like the build-in types
of a programming language. The syntax used to create an object is no
different than the syntax used to create an integer object in C.
Data
Abstraction and
Encapsulation Data Abstraction