CIS-165 C Programming I Bergen Community College - PowerPoint PPT Presentation

Loading...

PPT – CIS-165 C Programming I Bergen Community College PowerPoint presentation | free to download - id: 6c95b6-Yjg0Z



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

CIS-165 C Programming I Bergen Community College

Description:

CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal – PowerPoint PPT presentation

Number of Views:5
Avg rating:3.0/5.0
Date added: 4 December 2019
Slides: 31
Provided by: fai127
Learn more at: http://profaljamal.yolasite.com
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: CIS-165 C Programming I Bergen Community College


1
CIS-165 C Programming I Bergen Community
College
  • Prof. Faisal Aljamal

2
Course Content
  1. Introduction to Hardware and Software.
  2. Program development.
  3. Interaction with the Computer system.
  4. Identifier Tables
  5. Program Structure heading Section and
    Declaration section
  6. Program Structure Input Section.

3
Course Content
  1. Program Structure Output Section.
  2. Program Structure Process Section.
  3. Formatted Output.
  4. Conditions and Boolean Expressions.
  5. Selection Control Structures.
  6. Repetitions Control Structure (do-While and for
    statements.
  7. Repetitions Control Structure (While Statement).

4
Course Content
  1. Structured Data Types (One-dimensional Arrays)
  2. Processing One dimensional Arrays.

5
1. Introduction to Hardware and Software.
  • Hardware Components of a computer.
  • Systems software and applications software.
  • Programming languages.

6
2. Program development.
  • Overview of the program development Process.
  • Problem Specification.
  • Algorithm design and presentation.
  • Source code, object code and the Compiler..
  • Syntax Errors, run time errors, logic.

7
3. Interaction with the Computer system.
  • Formatting a disk.
  • Sign on and sign off procedures.
  • Creating, editing, and saving a source code file.
  • Compiling, debugging and executing a program.
  • Printing a text file.

8
4. Identifier Tables
  • Keywords, standard identifiers and
    programmer-defined identifiers.
  • Variables and symbolic constants.
  • Standard scalar data types.
  • String data type.
  • Literal constants.
  • Contents of an identifier table

9
5. Program Structure heading Section and
Declaration section
  • General Structure of a C program
  • Heading section.
  • Comment statement
  • Declaration statement.
  • typedef.
  • The main() function.

10
6. Program Structure Input Section.
  • System routines, the preprocessor and the Linker.
  • Streams and the iostream.
  • Manipulators.
  • String input.

11
7. Program Structure Output Section.
  • Unformatted output.
  • fstream library and file I/O.
  • Writing a program output to a disk file.

12
8. Program Structure Process Section.
  • Operator terminology.
  • Arithmetic operators.
  • Increment and decrement operators.
  • Side effects and sequence points.
  • Implicit and explicit type conversions.
  • Assignment operator and assignment statement.
  • String copy function
  • Std Math. Library functions.

13
9. Formatted output.
  • Manipulators with arguments.
  • ios format flags.
  • Output design.
  • Creating a program template.

14
Conditional and Boolean Expressions.
  • Simple conditions and compound conditions.
  • Relational, equality, negation and logical
    operators.
  • Precedence and associatively of operators.
  • String compare function.
  • Representing conditions by Boolean expressions

15
11. Selection control structure.
  • if statement and nested if statement .
  • Compound statement.
  • Conditional operator.
  • Switch statement.
  • Break statement.
  • Program testing and debugging- structured walk
    through.

16
12. Repetition Control Structures
  • do while statement.
  • Input validation.
  • For statement.
  • Table generation.

17
13. Repetition Control Structures
  • While statement.
  • Continue statement.
  • Program testing and debugging-structured walk
    through.

18
14. Structured data Types one D Arrays.
  • Terminology and storage.
  • Declaration form use of typedef.
  • Array input.
  • Array output

19
15. Processing One-dimensional Arrays
  • Mean component of an array.
  • Maximum and Minimum component of an array.
  • Storing array component.
  • Searching an array.
  • Other fundamental array processing algorithms.

20
Note !!
  • Slide one 1-15 demonstrated the general contents
    of the CIS-165 Course in plain English
  • What does that mean in C ??

21
C UP_FRONT NO Surprises !!
  • Data types
  • integers, real (float), long, short, char,
    string.
  • Declaration
  • int var1
  • float var2
  • Char z
  • .
  • .

22
C
  • Library functions such as
  • sqrt( ), pow( ).
  • Input such as
  • cin gtgt , cin.getline( )
  • Output such as
  • cout ltlt
  • Formatted output
  • setw( )

23
C
  • Operators
  • gt, lt, , !
  • Logical
  • and , or
  • Boolean (True and False)
  • if else statement
  • if (x gt y)
  • z0
  • else
  • z1

24
C
  • Switch and case
  • switch(var)
  • case 1
  • codes to execute.
  • break
  • case 2
  • codes to execute.
  • break

25
Do while
  • do
  • stat1
  • stat n
  • while (condition true)

26
While stat.
  • While (condition true)
  • stat 1
  • stat n

27
  • Input validation
  • if(cin.fail())
  • For stat.
  • For (i0 I lt 100 i)
  • stat 1
  • stat n

28
One D Array
  • int MyArray5 1,2, 4, 6,8
  • Char My_Chr_Array a, b, g,\0
  • typedef
  • typedef unsigned short int USHORT
  • USHORT width, height, length

29
Constants (also called literals)
  • Defining constants with const
  • const unsigned short int Stu_Per_Class 10
  • Defining constants in traditional way
  • define studentsPerClass 10
  • Symbolic Const.
  • students classes 15
  • Enumerated const
  • enum Color Red, Blue, White, Black

30
White space
  • X a b
  • Or as
  • X a
  • b
About PowerShow.com