C, Objective C & C++ Comparative Study of the Languages
1. C, OBJECTIVE-C & C++
COMPARATIVE STUDY OF THE LANGUAGES
By
Mr. V. VEERANAN
M.Sc. Computer Science., Dip. in Yoga.,
Government Arts College, Melur – 625 106.
2. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Basic
C Imperative (Procedural) Structured
Objective-C Reflective, Class-based object oriented
C++
Multi-Paradigm, Procedural, Object-
Oriented, Functional Generic
3. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Appeared in
C 1972
Objective-C 1983
C++ 1985
4. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Designed By
C Dennis Ritchine
Objective-C Brad Cox & Tom Love
C++ Bjarne Stroustrup
5. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Developer
C
Dennis Ritchite & Bell Labs (creators);
ANSI X3J11 (ANSI C);
ISO/IEC JTC1/SC22/WG14(ISO C)
Objective-C Apple
C++
Bjarne Stronestrup Bell Labs
ISO/IECJTC1/SC22/WG21
6. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Approach Used
C Top down approach
Objective-C ---
C++ Bottom up approach
7. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
File Name Extension
C .h, .c
Objective-C .h, .m, .mm
C++ .h, .hh, .cpp, .hpp, .cxx, .c++
8. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Syntax
C Very Complex
Objective-C Easiest
C++ Moderate
9. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Inheritance Feature
C No such feature
Objective-C
Supports all types of inheritance
excluding multiple inheritance
C++ Supports all types of inheritance
10. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Emphasis on
C Functions
Objective-C Both (function & Data)
C++ Data
11. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Function Declaration
C
Functions can be declared at the point of
use
Objective-C
Totally class-based so function are
declared in the classes
C++
Functions must be prototyped before
main
12. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Concept of overloading
C Doesn’t Support overloading
Objective-C Supports overloading
C++ Supports Overloading
13. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Header Files
C Need to include them
Objective-C No need
C++ Need to include them
14. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Concept of garbage collection
C For de-allocating memory free( ) is used
Objective-C Automatic garbage collection
C++
For de-allocating memory delete ( ) is
used
15. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Keywords
C 32
Objective-C 12
C++ 98
16. C, Objective-C & C++
Mr. V.Veeranan, M.Sc. Computer Science, Dip. in Yoga
Used of return keyword
C
Main( ). doesn’t automatically returns
zero (0)
Objective-C No concept of main ( ) & return
C++ Main ( ) automatically return zero(0)