SlideShare a Scribd company logo
1 of 76
Introduction to
Software
Engineering
CONTENTS OF THIS COURSE
Here’s what you’ll find in this LECTURE1:
 Functions
 Data type.
 Numeral System.
 Variables.
 Visualize code using Visualizer.
Lecture 1
“Let’s make the world a
better place”
Functions
• You can think of function as a black box take an input and
produce an output and it’s not important to know what is
the algorithm inside of it , just enough to know how you can
use and what is their function.
Hello,World
Functions
Data types
• Fixed values such as numbers, letters, and strings are called
“constants”
• String constants use single quotes (') or double quotes (")
Data types
• Fixed values such as numbers, letters, and strings are called
“constants”
• String constants use single quotes (') or double quotes (")
Data types
• Numerical Data int, float, double.
• Textual Data string, char.
• Bolean Data true, false.
Some common Compiler errors
• Forgetting the semicolon ;
• Forgetting to one the curly braces of the main function { }
• Forgetting the “ “ in a string.
Some common Compiler errors
 performs calculations
a billion calculations per second! two operations in same
time light travels 1 foot.
 Remembers results
100s of gigabytes of storage!
typical machine could hold 1.5M books of standard size
Variables
Variables
• You can think of variable as a little box or a container to
store data in the memory of the computer and later
retrieve the data using the variable “name”
• Programmers get to choose the names of the variables
• You can change the contents of a variable in a later
statement
Variables
Rules for naming variables in C++
 The first character of the name must be a letter or an underscore.
 Only letters, digits, or underscores can follow the first letter. Blank
spaces aren’t allowed; separate words in a multiple-word identifier
are indicated by capitalizing the first letter of one or more of the
words. (Although underscores can also be used for this purpose,
they are increasingly being used only for compiler-dependent
identifiers.)
 An identifier name can’t be one of the keywords listed in Table 1.1.
(A keyword is a word the language sets aside for a special purpose
and can be used only in a specified manner. 4 )
 The maximum number of characters in an identifier is 1024.
Rules for naming variables in C++
Wrong Naming examples
 3number ●
 total salary ●
 private
Variables
Variables
Variables
Variables
Variables
Arian 5 the worst bug disaster
On June 4th, 1996, the very first Ariane 5 rocket ignited its
engines and began speeding away from the coast of French
Guiana. 37 seconds later, the rocket flipped 90 degrees in
the wrong direction, and less than two seconds later,
aerodynamic forces ripped the boosters apart from the
main stage at a height of 4km.
Arian 5 the worst bug disaster
On June 4th, 1996, the very first Ariane 5 rocket ignited its
engines and began speeding away from the coast of French
Guiana. 37 seconds later, the rocket flipped 90 degrees in
the wrong direction, and less than two seconds later,
aerodynamic forces ripped the boosters apart from the
main stage at a height of 4km.
More Variables
Comments in C++
Comments in C++ begin with // character and continue to the end of the line.
Because comments do not execute, when you run a program you will not see
any indication of the comment there. Comments are in the source code for
humans to read, not for computers to execute.
More Variables
Constant Value
● Constant values can not be overwritten.
● You must assign a value to it.
Numeric Expressions
Operation
Operator
Addition
+
Subtraction
-
Multiplication
*
Division
/
Remainder
%
Escape Sequence
User Input
C++ has an input function which lets you ask
a user for some text input
Input / Output in C++
cout (Console Output)
cin (Console Input)
Conditions
C++ uses boolean logic to evaluate conditions. The boolean
values True and False are returned when an expression is
compared or evaluated.
Conditions
Conditions
C++ uses boolean logic to evaluate conditions. The boolean
values True and False are returned when an expression is
compared or evaluated.
Conditions
C++ uses boolean logic to evaluate conditions. The boolean
values True and False are returned when an expression is
compared or evaluated.
Conditions-Logic Gates
A Logic gate is a kind of the basic building block of a digital
circuit having two inputs and one output. ... Logic gates are
used to carry out the logical operations on single or
multiple binary inputs and result in one binary output. In
simple words, logic gates are the electronic circuits in a
digital system.
Conditions-Logic Gates
Bitwise Operator
Precision in floating point in CPP
 floor(), ceil(), round(), setprecision()
Loop
C++ has two primitive loop commands:
1.while loops
2.for loops
Loop
C++ has two primitive loop commands:
1.while loops
2.for loops
Loop
 C++ has two primitive loop commands:
while loops
Loop
 C++ has two primitive loop commands:
for loops
Break and continue
Do- while
Nested for
Data Structures
Every child knows that one can – at least beyond a certain
number – find things much easier if one keeps order. We
humans understand by keeping things in order that we
separate the things that we possess into categories and
assign fixed locations to these categories that we can
remember.
We may simply throw socks into a drawer, but for other things
like DVDs it is best to sort them beyond a certain number so
that we can quickly find every DVD.
Data Structures
1D Array
Data Structures-String
What If I told u there is no Variable called string
Data Structures-String
A L M E N T O R
Arrays
Arrays
2D Array
2D Array
2D Array
Ternary operator
Defining a function
Defining a function
Pointers
Pointers
A pointer is a data item whose:
Value is a memory address.
Type describes the data located at that memory address.
Pointers make a computer environment more like the real
world!
Pointers
Pointers provide an alternative way to pass data between
function.
When we pass data by value in a function we pass a copy of
the data.
If we use pointers instead, we have the power to pass the
actual variable itself.
That means that a change that is made in one function can
impact what happens in a different function.
Pass by Reference Vs by Value
Passing by Reference affects the variable outside the
function’s scope.
Passing by reference doesn’t change anything outside the
function.
Pointers
Pointers
Pointers
A Pointer is nothing more than an addresses to locations in
memory where variables live.
Pointers
Dynamic Memory allocation
Dynamic Memory allocation
We Get this dynamically allocated memory by making
call to the c standard library function malloc() passing
as its parameter the number of bytes
Requested.
After obtaining memory for you(if it can), malloc will
return ap pointer to that memory.
What if malloc() can’t give you memory? It will hand you
back.
Dynamic Memory allocation
Dynamic Memory allocation
Here is the trouble: Dynamically- allocated memory is not
automatically returned to the system for later use, when function
in which it’s created finishes executed.
Failing to return memory back to the system when you’re
finished with it result in a memory leak, which can compromise
your system’s performance.
When you finish working with dynamically-allocated memory
you must free() it.
Dynamic Memory allocation
Dynamic Memory allocation
Dynamic Memory allocation
Dynamic Memory allocation

More Related Content

What's hot

Object oriented programming concepts
Object oriented programming conceptsObject oriented programming concepts
Object oriented programming conceptsrahuld115
 
Lost & Found Ppt
Lost & Found PptLost & Found Ppt
Lost & Found Pptceon
 
Space robotics pdf by salim malik
Space robotics pdf by salim malikSpace robotics pdf by salim malik
Space robotics pdf by salim malikSalim Malik
 
Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function Kamlesh Makvana
 
Code Complexity 101
Code Complexity 101Code Complexity 101
Code Complexity 101Arun Saha
 

What's hot (7)

Object oriented programming concepts
Object oriented programming conceptsObject oriented programming concepts
Object oriented programming concepts
 
Lost & Found Ppt
Lost & Found PptLost & Found Ppt
Lost & Found Ppt
 
DFD level-0 to 1
DFD level-0 to 1DFD level-0 to 1
DFD level-0 to 1
 
Space robotics pdf by salim malik
Space robotics pdf by salim malikSpace robotics pdf by salim malik
Space robotics pdf by salim malik
 
Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function
 
Code Complexity 101
Code Complexity 101Code Complexity 101
Code Complexity 101
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 

Similar to Introduction to Software Engineering with C++

Similar to Introduction to Software Engineering with C++ (20)

C++ Made simple .pptx
C++ Made simple .pptxC++ Made simple .pptx
C++ Made simple .pptx
 
Introduction to Structure Programming with C++
Introduction to Structure Programming with C++Introduction to Structure Programming with C++
Introduction to Structure Programming with C++
 
Aspdot
AspdotAspdot
Aspdot
 
C++.pptx
C++.pptxC++.pptx
C++.pptx
 
C_plus_plus
C_plus_plusC_plus_plus
C_plus_plus
 
Clean Code
Clean CodeClean Code
Clean Code
 
Introduction to c first week slides
Introduction to c first week slidesIntroduction to c first week slides
Introduction to c first week slides
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
 
Data types and Operators
Data types and OperatorsData types and Operators
Data types and Operators
 
C Language Part 1
C Language Part 1C Language Part 1
C Language Part 1
 
02 functions, variables, basic input and output of c++
02   functions, variables, basic input and output of c++02   functions, variables, basic input and output of c++
02 functions, variables, basic input and output of c++
 
PythonStudyMaterialSTudyMaterial.pdf
PythonStudyMaterialSTudyMaterial.pdfPythonStudyMaterialSTudyMaterial.pdf
PythonStudyMaterialSTudyMaterial.pdf
 
C interview questions
C interview questionsC interview questions
C interview questions
 
Chap 2 c++
Chap 2 c++Chap 2 c++
Chap 2 c++
 
C –FAQ:
C –FAQ:C –FAQ:
C –FAQ:
 
1-19 CPP Slides 2022-02-28 18_22_ 05.pdf
1-19 CPP Slides 2022-02-28 18_22_ 05.pdf1-19 CPP Slides 2022-02-28 18_22_ 05.pdf
1-19 CPP Slides 2022-02-28 18_22_ 05.pdf
 
Basics of cpp
Basics of cppBasics of cpp
Basics of cpp
 
Lec-1c.pdf
Lec-1c.pdfLec-1c.pdf
Lec-1c.pdf
 
C++ How to program
C++ How to programC++ How to program
C++ How to program
 
interview questions.docx
interview questions.docxinterview questions.docx
interview questions.docx
 

More from Mohamed Essam

Data Science Crash course
Data Science Crash courseData Science Crash course
Data Science Crash courseMohamed Essam
 
2.Feature Extraction
2.Feature Extraction2.Feature Extraction
2.Feature ExtractionMohamed Essam
 
Introduction to Robotics.pptx
Introduction to Robotics.pptxIntroduction to Robotics.pptx
Introduction to Robotics.pptxMohamed Essam
 
Introduction_to_Gui_with_tkinter.pptx
Introduction_to_Gui_with_tkinter.pptxIntroduction_to_Gui_with_tkinter.pptx
Introduction_to_Gui_with_tkinter.pptxMohamed Essam
 
Getting_Started_with_DL_in_Keras.pptx
Getting_Started_with_DL_in_Keras.pptxGetting_Started_with_DL_in_Keras.pptx
Getting_Started_with_DL_in_Keras.pptxMohamed Essam
 
Let_s_Dive_to_Deep_Learning.pptx
Let_s_Dive_to_Deep_Learning.pptxLet_s_Dive_to_Deep_Learning.pptx
Let_s_Dive_to_Deep_Learning.pptxMohamed Essam
 
OOP-Advanced_Programming.pptx
OOP-Advanced_Programming.pptxOOP-Advanced_Programming.pptx
OOP-Advanced_Programming.pptxMohamed Essam
 
Regularization_BY_MOHAMED_ESSAM.pptx
Regularization_BY_MOHAMED_ESSAM.pptxRegularization_BY_MOHAMED_ESSAM.pptx
Regularization_BY_MOHAMED_ESSAM.pptxMohamed Essam
 
1.What_if_Adham_Nour_tried_to_make_a_Machine_Learning_Model_at_Home.pptx
1.What_if_Adham_Nour_tried_to_make_a_Machine_Learning_Model_at_Home.pptx1.What_if_Adham_Nour_tried_to_make_a_Machine_Learning_Model_at_Home.pptx
1.What_if_Adham_Nour_tried_to_make_a_Machine_Learning_Model_at_Home.pptxMohamed Essam
 
2.Data_Strucures_and_modules.pptx
2.Data_Strucures_and_modules.pptx2.Data_Strucures_and_modules.pptx
2.Data_Strucures_and_modules.pptxMohamed Essam
 
Activation_function.pptx
Activation_function.pptxActivation_function.pptx
Activation_function.pptxMohamed Essam
 
Deep_Learning_Frameworks
Deep_Learning_FrameworksDeep_Learning_Frameworks
Deep_Learning_FrameworksMohamed Essam
 

More from Mohamed Essam (20)

Data Science Crash course
Data Science Crash courseData Science Crash course
Data Science Crash course
 
2.Feature Extraction
2.Feature Extraction2.Feature Extraction
2.Feature Extraction
 
Data Science
Data ScienceData Science
Data Science
 
Introduction to Robotics.pptx
Introduction to Robotics.pptxIntroduction to Robotics.pptx
Introduction to Robotics.pptx
 
Introduction_to_Gui_with_tkinter.pptx
Introduction_to_Gui_with_tkinter.pptxIntroduction_to_Gui_with_tkinter.pptx
Introduction_to_Gui_with_tkinter.pptx
 
Getting_Started_with_DL_in_Keras.pptx
Getting_Started_with_DL_in_Keras.pptxGetting_Started_with_DL_in_Keras.pptx
Getting_Started_with_DL_in_Keras.pptx
 
Linear_algebra.pptx
Linear_algebra.pptxLinear_algebra.pptx
Linear_algebra.pptx
 
Let_s_Dive_to_Deep_Learning.pptx
Let_s_Dive_to_Deep_Learning.pptxLet_s_Dive_to_Deep_Learning.pptx
Let_s_Dive_to_Deep_Learning.pptx
 
OOP-Advanced_Programming.pptx
OOP-Advanced_Programming.pptxOOP-Advanced_Programming.pptx
OOP-Advanced_Programming.pptx
 
1.Basic_Syntax
1.Basic_Syntax1.Basic_Syntax
1.Basic_Syntax
 
KNN.pptx
KNN.pptxKNN.pptx
KNN.pptx
 
Regularization_BY_MOHAMED_ESSAM.pptx
Regularization_BY_MOHAMED_ESSAM.pptxRegularization_BY_MOHAMED_ESSAM.pptx
Regularization_BY_MOHAMED_ESSAM.pptx
 
1.What_if_Adham_Nour_tried_to_make_a_Machine_Learning_Model_at_Home.pptx
1.What_if_Adham_Nour_tried_to_make_a_Machine_Learning_Model_at_Home.pptx1.What_if_Adham_Nour_tried_to_make_a_Machine_Learning_Model_at_Home.pptx
1.What_if_Adham_Nour_tried_to_make_a_Machine_Learning_Model_at_Home.pptx
 
Clean_Code
Clean_CodeClean_Code
Clean_Code
 
Linear_Regression
Linear_RegressionLinear_Regression
Linear_Regression
 
2.Data_Strucures_and_modules.pptx
2.Data_Strucures_and_modules.pptx2.Data_Strucures_and_modules.pptx
2.Data_Strucures_and_modules.pptx
 
Naieve_Bayee.pptx
Naieve_Bayee.pptxNaieve_Bayee.pptx
Naieve_Bayee.pptx
 
Activation_function.pptx
Activation_function.pptxActivation_function.pptx
Activation_function.pptx
 
Deep_Learning_Frameworks
Deep_Learning_FrameworksDeep_Learning_Frameworks
Deep_Learning_Frameworks
 
Neural_Network
Neural_NetworkNeural_Network
Neural_Network
 

Recently uploaded

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Introduction to Software Engineering with C++

  • 2. CONTENTS OF THIS COURSE Here’s what you’ll find in this LECTURE1:  Functions  Data type.  Numeral System.  Variables.  Visualize code using Visualizer.
  • 4. “Let’s make the world a better place”
  • 5. Functions • You can think of function as a black box take an input and produce an output and it’s not important to know what is the algorithm inside of it , just enough to know how you can use and what is their function. Hello,World
  • 7. Data types • Fixed values such as numbers, letters, and strings are called “constants” • String constants use single quotes (') or double quotes (")
  • 8. Data types • Fixed values such as numbers, letters, and strings are called “constants” • String constants use single quotes (') or double quotes (")
  • 9. Data types • Numerical Data int, float, double. • Textual Data string, char. • Bolean Data true, false.
  • 10. Some common Compiler errors • Forgetting the semicolon ; • Forgetting to one the curly braces of the main function { } • Forgetting the “ “ in a string.
  • 11. Some common Compiler errors  performs calculations a billion calculations per second! two operations in same time light travels 1 foot.  Remembers results 100s of gigabytes of storage! typical machine could hold 1.5M books of standard size
  • 13. Variables • You can think of variable as a little box or a container to store data in the memory of the computer and later retrieve the data using the variable “name” • Programmers get to choose the names of the variables • You can change the contents of a variable in a later statement
  • 15. Rules for naming variables in C++  The first character of the name must be a letter or an underscore.  Only letters, digits, or underscores can follow the first letter. Blank spaces aren’t allowed; separate words in a multiple-word identifier are indicated by capitalizing the first letter of one or more of the words. (Although underscores can also be used for this purpose, they are increasingly being used only for compiler-dependent identifiers.)  An identifier name can’t be one of the keywords listed in Table 1.1. (A keyword is a word the language sets aside for a special purpose and can be used only in a specified manner. 4 )  The maximum number of characters in an identifier is 1024.
  • 16. Rules for naming variables in C++
  • 17. Wrong Naming examples  3number ●  total salary ●  private
  • 23. Arian 5 the worst bug disaster On June 4th, 1996, the very first Ariane 5 rocket ignited its engines and began speeding away from the coast of French Guiana. 37 seconds later, the rocket flipped 90 degrees in the wrong direction, and less than two seconds later, aerodynamic forces ripped the boosters apart from the main stage at a height of 4km.
  • 24. Arian 5 the worst bug disaster On June 4th, 1996, the very first Ariane 5 rocket ignited its engines and began speeding away from the coast of French Guiana. 37 seconds later, the rocket flipped 90 degrees in the wrong direction, and less than two seconds later, aerodynamic forces ripped the boosters apart from the main stage at a height of 4km.
  • 26. Comments in C++ Comments in C++ begin with // character and continue to the end of the line. Because comments do not execute, when you run a program you will not see any indication of the comment there. Comments are in the source code for humans to read, not for computers to execute.
  • 28. Constant Value ● Constant values can not be overwritten. ● You must assign a value to it.
  • 31. User Input C++ has an input function which lets you ask a user for some text input
  • 32. Input / Output in C++ cout (Console Output) cin (Console Input)
  • 33. Conditions C++ uses boolean logic to evaluate conditions. The boolean values True and False are returned when an expression is compared or evaluated.
  • 35. Conditions C++ uses boolean logic to evaluate conditions. The boolean values True and False are returned when an expression is compared or evaluated.
  • 36. Conditions C++ uses boolean logic to evaluate conditions. The boolean values True and False are returned when an expression is compared or evaluated.
  • 37. Conditions-Logic Gates A Logic gate is a kind of the basic building block of a digital circuit having two inputs and one output. ... Logic gates are used to carry out the logical operations on single or multiple binary inputs and result in one binary output. In simple words, logic gates are the electronic circuits in a digital system.
  • 40. Precision in floating point in CPP  floor(), ceil(), round(), setprecision()
  • 41. Loop C++ has two primitive loop commands: 1.while loops 2.for loops
  • 42. Loop C++ has two primitive loop commands: 1.while loops 2.for loops
  • 43. Loop  C++ has two primitive loop commands: while loops
  • 44. Loop  C++ has two primitive loop commands: for loops
  • 48. Data Structures Every child knows that one can – at least beyond a certain number – find things much easier if one keeps order. We humans understand by keeping things in order that we separate the things that we possess into categories and assign fixed locations to these categories that we can remember. We may simply throw socks into a drawer, but for other things like DVDs it is best to sort them beyond a certain number so that we can quickly find every DVD.
  • 51. Data Structures-String What If I told u there is no Variable called string
  • 62. Pointers A pointer is a data item whose: Value is a memory address. Type describes the data located at that memory address. Pointers make a computer environment more like the real world!
  • 63. Pointers Pointers provide an alternative way to pass data between function. When we pass data by value in a function we pass a copy of the data. If we use pointers instead, we have the power to pass the actual variable itself. That means that a change that is made in one function can impact what happens in a different function.
  • 64. Pass by Reference Vs by Value Passing by Reference affects the variable outside the function’s scope. Passing by reference doesn’t change anything outside the function.
  • 67. Pointers A Pointer is nothing more than an addresses to locations in memory where variables live.
  • 70. Dynamic Memory allocation We Get this dynamically allocated memory by making call to the c standard library function malloc() passing as its parameter the number of bytes Requested. After obtaining memory for you(if it can), malloc will return ap pointer to that memory. What if malloc() can’t give you memory? It will hand you back.
  • 72. Dynamic Memory allocation Here is the trouble: Dynamically- allocated memory is not automatically returned to the system for later use, when function in which it’s created finishes executed. Failing to return memory back to the system when you’re finished with it result in a memory leak, which can compromise your system’s performance. When you finish working with dynamically-allocated memory you must free() it.

Editor's Notes

  1. Example of the doctors that has no idea about problem solving.
  2. Example of the doctors that has no idea about problem solving.
  3. Example of the doctors that has no idea about problem solving.
  4. Example of the doctors that has no idea about problem solving.
  5. Example of the doctors that has no idea about problem solving.
  6. Example of the doctors that has no idea about problem solving.
  7. Example of the doctors that has no idea about problem solving.
  8. Example of the doctors that has no idea about problem solving.
  9. Example of the doctors that has no idea about problem solving.
  10. Example of the doctors that has no idea about problem solving.
  11. Example of the doctors that has no idea about problem solving.
  12. Example of the doctors that has no idea about problem solving.
  13. Example of the doctors that has no idea about problem solving.
  14. Example of the doctors that has no idea about problem solving.
  15. Example of the doctors that has no idea about problem solving.
  16. Example of the doctors that has no idea about problem solving.
  17. Example of the doctors that has no idea about problem solving.
  18. Example of the doctors that has no idea about problem solving.
  19. Example of the doctors that has no idea about problem solving.
  20. Example of the doctors that has no idea about problem solving.
  21. Example of the doctors that has no idea about problem solving.
  22. Example of the doctors that has no idea about problem solving.
  23. Example of the doctors that has no idea about problem solving.
  24. Example of the doctors that has no idea about problem solving.
  25. Example of the doctors that has no idea about problem solving.
  26. Example of the doctors that has no idea about problem solving.
  27. Example of the doctors that has no idea about problem solving.
  28. Example of the doctors that has no idea about problem solving.
  29. Example of the doctors that has no idea about problem solving.
  30. Example of the doctors that has no idea about problem solving.
  31. Example of the doctors that has no idea about problem solving.
  32. Example of the doctors that has no idea about problem solving.
  33. Example of the doctors that has no idea about problem solving.
  34. Example of the doctors that has no idea about problem solving.
  35. Example of the doctors that has no idea about problem solving.
  36. Example of the doctors that has no idea about problem solving.
  37. Example of the doctors that has no idea about problem solving.
  38. Example of the doctors that has no idea about problem solving.
  39. Example of the doctors that has no idea about problem solving.
  40. Example of the doctors that has no idea about problem solving.
  41. Example of the doctors that has no idea about problem solving.
  42. Example of the doctors that has no idea about problem solving.
  43. Example of the doctors that has no idea about problem solving.
  44. Example of the doctors that has no idea about problem solving.
  45. Example of the doctors that has no idea about problem solving.
  46. Example of the doctors that has no idea about problem solving.
  47. Example of the doctors that has no idea about problem solving.
  48. Example of the doctors that has no idea about problem solving.
  49. Example of the doctors that has no idea about problem solving.
  50. Example of the doctors that has no idea about problem solving.
  51. Example of the doctors that has no idea about problem solving.
  52. Example of the doctors that has no idea about problem solving.
  53. Example of the doctors that has no idea about problem solving.
  54. Example of the doctors that has no idea about problem solving.
  55. Example of the doctors that has no idea about problem solving.
  56. Example of the doctors that has no idea about problem solving.
  57. Example of the doctors that has no idea about problem solving.
  58. Example of the doctors that has no idea about problem solving.
  59. Example of the doctors that has no idea about problem solving.
  60. Example of the doctors that has no idea about problem solving.
  61. Example of the doctors that has no idea about problem solving.
  62. Example of the doctors that has no idea about problem solving.
  63. Example of the doctors that has no idea about problem solving.
  64. Example of the doctors that has no idea about problem solving.
  65. Example of the doctors that has no idea about problem solving.
  66. Example of the doctors that has no idea about problem solving.
  67. Example of the doctors that has no idea about problem solving.
  68. Example of the doctors that has no idea about problem solving.
  69. Example of the doctors that has no idea about problem solving.
  70. Example of the doctors that has no idea about problem solving.
  71. Example of the doctors that has no idea about problem solving.
  72. Example of the doctors that has no idea about problem solving.