C++ Programming Essentials Lecture 1 PDF
Document Details
Uploaded by RazorSharpWalnutTree160
كلية تكنولوجيا الصناعة والطاقة
Dr. Nehal El Azaly
Tags
Summary
This document is a lecture on the C++ programming language. It provides an introduction to fundamental concepts, including simple programs, input/output statements, and basic computer memory concepts.
Full Transcript
Lecture (1) " Programming Essentials in C++ " Presented by : Dr. Nehal El Azaly About C++ C++ is a general-purpose programming language that was developed as an enhancement of the C language to include object-oriented paradigm. C++ is a high lev...
Lecture (1) " Programming Essentials in C++ " Presented by : Dr. Nehal El Azaly About C++ C++ is a general-purpose programming language that was developed as an enhancement of the C language to include object-oriented paradigm. C++ is a high level programming language. It can be compiled into machine code and executed on a computer. OBJECTIVES in this chapter you’ll learn: To write simple computer programs in C++. To write simple input and output statements. Basic computer memory concepts. To use arithmetic operators. The precedence of arithmetic operators. To write simple decision-making statements. Why we learn C++? C++ is an object-oriented programming language. C++ maintains the features of C which allowed for low-level memory access but also gives the programmer new tools to simplify memory management. C++ is a powerful general-purpose programming language. It can be used to create small programs or large applications. First Program in C++: Printing a Line of Text First Program in C++: Printing a Line of Text (How to display messages on the screen ?) (How to display comment on the screen ?) Modifying Our First C++ Program To write simple input and output statements (How to obtain information from the user ?) Another C++ Program: Adding Integers Memory Concepts Arithmetic (How to perform arithmetic calculations ?) A simple C++ Program 1) #include Include the contents of the Lines beginning with # are iostream library which contains preprocessor directives. input/output operations. 2) using namespace std; The C++ standard library is 3) int main() defined within this namespace. 4) { 5) cout