C++ Notes Object Oriented Programming - CSE - CSE202

This is a downloaded C++ Note for Lovely Professional University's (LPU) CSE202-OBJECT ORIENTED PROGRAMMING course. 

Lovely Professional University (LPU) is a well-known private university in India that offers a wide range of undergraduate and postgraduate courses, including a course on OBJECT-ORIENTED PROGRAMMING (CSE202). A large part of computer science and information technology use object-oriented programming that deals with low-level memory management while providing high-level abstractions, making it suitable for various applications ranging from system programming to game development.

UNIT-WISE Notes - 10 Unit  | C++ | Object Oriented Programming

Unit 1 Notes: Introduction 

Compiled Languages and C++ 

1.1 Why Use a Language Like C++?

 At its core, a computer is just a processor with some memory, capable of running tiny instructions like “store 5 in memory location 23459.” Why would we express a program as a text file in a programming language, instead of writing processor instructions? The advantages: 
 1. Conciseness: programming languages allow us to express common sequences of commands more concisely. C++ provides some especially powerful shorthands. 
 2. Maintainability: modifying code is easier when it entails just a few text edits, instead of rearranging hundreds of processor instructions. C++ is object-oriented (more on that in Lectures 7-8), which further improves maintainability. 
 3. Portability: different processors make different instructions available. Programs written as text can be translated into instructions for many different processors; one of C++’s strengths is that it can be used to write programs for nearly any processor. C++ is a high-level language: when you write a program in it, the shorthands are sufficiently expressive that you don’t need to worry about the details of processor instructions. C++ does give access to some lower-level functionality than other languages (e.g. memory addresses). 

 1.2 The Compilation Process

 A program goes from text files (or source files) to processor instructions as follows: 



Just as cout << is the syntax for outputting values, cin >> (line 6) is the syntax for inputting values. 

Memory trick: if you have trouble remembering which way the angle brackets go for cout and cin, think of them as arrows pointing in the direction of data flow. cin represents the terminal, with data flowing from it to your variables; cout likewise represents the terminal, and your data flows to it.

Debugging 

There are two kinds of errors you’ll run into when writing C++ programs: compilation errors and runtime errors. Compilation errors are problems raised by the compiler, generally resulting from violations of the syntax rules or misuse of types. These are often caused by typos and the like. Runtime errors are problems that you only spot when you run the program: you did specify a legal program, but it doesn’t do what you wanted it to. These are usually more tricky to catch, since the compiler won’t tell you about them.

Also, Read:- Learn C++ Programming: 10 Basic Programs for Beginners

FOR DOWNLOADING ALL THE CHAPTERS CLINK ON THE LINK GIVEN BELOW:

Unit-2: Flow Of Control 


Unit-3: Functions 


Unit-4: Arrays And Strings 


Unit-5: Pointers 


Unit-6: User-Defined Datatypes 


Unit-7: Object-Oriented Programming(OOP) And Inheritance


Unit-8: Memory Management 


Some Advanced Topics I 


Some Advanced Topics II 


For the Latest Updates:



إرسال تعليق (0)
أحدث أقدم