1 / 22

CIS 260 Computer Programming I in C

CIS 260 Computer Programming I in C. Prof. Timothy Arndt. Office location : BU 331 Office hours : 12:30pm – 2:30pm TTH, 7:00pm-8:00pm TH Office Phone : 687-4779 E-Mail : arndt@cis.csuohio.edu . Course Objectives. Develop algorithmic problem solving skills

Download Presentation

CIS 260 Computer Programming I in C

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CIS 260 Computer Programming I in C Prof. Timothy Arndt

  2. Office location: BU 331 Office hours: 12:30pm – 2:30pm TTH, 7:00pm-8:00pm TH Office Phone: 687-4779 E-Mail: arndt@cis.csuohio.edu

  3. Course Objectives • Develop algorithmic problem solving skills • Understand modern software engineering techniques for the design of program solutions • Learn the ANSI C programming language

  4. Course Overview • Introduction to computers & programming • Problem solving; variables; expressions, printf • Top down design; functions • Selection structures; if and switch statements • Repetition and loop statements

  5. Course Overview • Modular programming • Data types and operators • Arrays • Strings • Structure and Union Types • File Processing • Pointers and dynamic memory allocation • Stacks, Queues, Binary Trees

  6. Texts • Problem Solving and Program Design in C, Hanly and Koffman, Addison-Wesley, 1996.

  7. History of Electronic Computers • First electronic computer built in late 1930’s by Atanasoff and Berry • First general purpose computer called ENIAC, 1946 • These computers used vacuum tubes. Later computers used integrated circuits, LSI, VLSI

  8. Categorization of Computers • Microcomputers • Workstations • Mainframes • Supercomputers • Minicomputers • Servers

  9. Computer Hardware • Main memory • Secondary memory • Central processing unit • Input devices • Keyboards • Mouses • Output devices • Monitors • Printers

  10. Memory • The memory of a computer is an ordered sequence of storage locations called memory cells • Each memory cell has a unique address • The data stored in a cell are called the contents of the cell • A cell may contain diverse types of data - numbers, characters, or program data

  11. Bytes and bits • A memory cell is a grouping of smaller units called bytes. • A byte is the amount of storage required to store a single character • A bit (binary digit) is the smallest unit a computer can deal with • A bit is either 0 or 1

  12. Storage and Retrieval of Information in Memory • To store a value in a memory cell, the computer sets each bit of the cell to 0 or 1, destroying the previous values • To retrieve a value from a memory cell, the computer copies the contents of the cell to another area

  13. Main memory • Random access memory (RAM) is volatile (data is lost when the computer is turned off). • Read only memory (ROM) is non-volatile and is often used to store the startup instructions of the computer • Cache memory is fast RAM

  14. Secondary Storage Devices • Disk drives are read-write random access devices with files organized in directories and subdirectories • Hard disks • Floppy disks • CD-ROM drives are (usually) read-only random access devices • Tape drives are read-write sequential access devices

  15. Central Processing Unit • Coordinates all computer operations • Performs arithmetic and logical operations on data • Stored programs are executed in a cycle of instruction fetch, instruction decode, data fetch, instruction execute, result store sequences

  16. Input/Output Devices • I/O devices allow us to enter data for a computation and observe the results of the computation • Keyboard • Mouse • Monitor • Printer

  17. Programming Languages • Machine languages are the native languages of the computer and are coded as strings of 0’s and 1’s • Assembly languages substitute symbolic names for strings of 0’s and 1’s • High-Level Language instructions correspond to sequences of assembly language instructions and are easier to read/write

  18. Relationship Between High-Level and Machine Languages • In order to be executed by a computer, a program written in a high-level language (source program) must be translated to machine language • The translator is called a compiler • The resulting program is called an object program

  19. Operating System • The software which controls the operation of a computer is called the operating system • Operating systems may have graphical interfaces (GUIs) command line interfaces (CLIs) or both

  20. Software Development Method • Specify the problem requirements • Analyze the problem • Design the algorithm to solve the problem • Implement the algorithm • Test and verify the completed algorithm • Maintain and update the program

  21. Case Study: Miles to Kilometers • Analyze the problem • Problem input: distance in miles • Problem output: distance in kilometers • Additional constraints on the solution?

  22. Design • Algorithm • Get the distance in miles • Convert the distance to kilometers • Display the distance in kilometers • Refine the algorithm • The distance in kilometers is 1.609 times the distance in miles

More Related