c basics
play

C++ Basics Fundamentals of Computer Science Outline Part 1: - PowerPoint PPT Presentation

C++ Basics Fundamentals of Computer Science Outline Part 1: Overview Program Structure Part 2: Variables and Data Types Operators Basic Input/Output (I/O) Part 3: Control Structures Functions Control


  1. C++ Basics Fundamentals of Computer Science

  2. Outline  Part 1:  Overview  Program Structure  Part 2:  Variables and Data Types  Operators  Basic Input/Output (I/O)  Part 3:  Control Structures  Functions

  3. Control Structures  Conditional (if) Statement  Example:

  4. Control Structures  Selection Statement  Example:

  5. Control Structures  Iteration: while loop  Example:

  6. Control Structures  Iteration: do-while loop  Example:

  7. Control Structures  Iteration: for loop  Example:

  8. Control Structures  Iteration: range-based for loop  Example:

  9. Functions  Function Syntax:  Example:

  10. Functions  Example with no return type:

  11. Functions  Pass by Value  vs.  Pass by Reference:

  12. Functions  Pass by Value  Pass by Reference:  Safe and Efficient:

  13. Functions  Default Values in parameters

  14. Functions  Declaring Functions:  Any identifier – function or variable – must be declared before it is used  So… can define function above main() function OR  Can use a function declaration before code:

  15. Summary  Part 1:  Overview  Program Structure  Part 2:  Variables and Data Types  Operators  Basic Input/Output (I/O)  Part 3:  Control Structures  Functions

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend