Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Prof. Achala Yash delivered this lecture at Ankit Institute of Technology and Science for Object Oriented Programming course. It includes: Object, Oriented, Programming, Languages, High, Performance, Computing, Superset, Library, Functional, Bjarne, Stroustrup
Typology: Slides
1 / 44
Outline of the Lecture 05 (^1) C++ 2 Examples (^3) Example 1 (^4) Example 2 (^5) Exercises (^6) References 7 Thanks
C++ Programming Language Superset of C Language, i.e., Contains the whole C Language Structured but Not Structured because of GOTO statement cin for Input or cout for Output Statements Huge Library of Functions at Run Time (C & C++) C Compiler can Compile a C++ Compiler Compilers for Other Programming Languages can be Written in C++ Language Fully Supports both Functional and Object Oriented Programming Paradigms Developed By Bjarne Stroustrup (59, alive) in 1983
C++ Programming Language, ... One of the Most Popular Programming Languages ever Created C++ is widely used in the Software Industry. Systems Software, Application Software, Device Drivers, High Performance Server and client Applications, Embedded Software, Entertainment Software such as Video Games Several Groups Provide both Free and Proprietary C++ compiler software, including the GNU Project, Microsoft, Intel and Borland C++ has Greatly Influenced many other Popular Programming Languages, most notably Java
Examples Adding two Numbers Finding the Maximum of Two Numbers
Adding two Numbers class TwoNums { }
Adding two Numbers class TwoNums { int x, y; };
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); };
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); }; void TwoNums::set_values (int a, int b) { x = a; y = b; }
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); int Sum () {return (x + y);} };
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); int Sum () {return (x + y);} int Diff1 () {return (x - y);} };
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); int Sum () {return (x + y);} int Diff1 () {return (x - y);} int Diff2 () {return (y - x);} };
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); int Sum () {return (x + y);} int Diff1 () {return (x - y);} int Diff2 () {return (y - x);} ... ... };
Adding two Numbers class TwoNums { int x, y; public: void set_values (int, int); int Sum () {return (x + y);} int Diff1 () {return (x - y);} int Diff2 () {return (y - x);} ... ... }; void TwoNums::set_values (int a, int b) { x = a; y = b; }
Adding two Numbers, ... #include
Adding two Numbers, ... #include
Adding two Numbers, ... #include
Adding two Numbers, ... #include
Adding two Numbers, ... #include
Adding two Numbers, ... #include
Adding two Numbers, ... #include
Adding two Numbers, ... #include
Adding two Numbers, ... #include
Adding two Numbers, ... #include
Finding the Maximum of Two Numbers class TwoNums { };