1 / 11

Chapter 1

Chapter 1. Introduction to Programming in C. CSC 140. PROFESSOR: David L. Sonnier Derby 208 698-4270 TEXTBOOK: K. N. King, C Programming: A Modern Approach ( Available at the Lyon Bookstore ). Your Evaluation. Quizzes/Homework/Effort 10% Projects 3 0% Tests 40%

libitha
Télécharger la présentation

Chapter 1

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. Chapter 1 Introduction to Programming in C

  2. CSC 140 PROFESSOR: David L. Sonnier Derby 208 698-4270 TEXTBOOK: K. N. King, C Programming: A Modern Approach (Available at the Lyon Bookstore)

  3. Your Evaluation • Quizzes/Homework/Effort 10% • Projects 30% • Tests 40% • Final Exam (2 hours) 20%

  4. Introduction to C • Objective: Learn to program, using Cas a vehicle • Programming languages: Language for communicating with a computer • Machine Code (Machine Language) • Assembly Language • High Level Language • The LINUX environment / Operating System • Writing your first C program – vi editor • Finding & fixing errors

  5. Terminology • Compiler • Source code • Object code • Program • Operating System • Editor

  6. History of LINUX • UNIX Operating System – Developed at Bell Labs • LINUX – an “imitation” of UNIX developed by programmer Linus Torvalds and an international group of fanatics and enthusiasts in the 1990’s • “Open Source” operating system • Various versions: SUSE, Red Hat, etc. • Ideal operating system / programming environment

  7. History of C • BCPL (Basic Computer Programming Language) • B – Developed from BCPL (~1970) • NB – “New B,” better suited for the PDP-11 • C – Developed in the 1970’s. • C++ - Allows the object-oriented approach

  8. Characteristics of C • A “low-level” language; provides machine-level functionality with elements of a high-level language • A “small” language – limited set of features. • A “permissive” language – Assumes you know what you’re doing….allows you to make some BAD mistakes.

  9. Strengths • Efficiency • Portability • Power • Flexibility • Standard Library • Integration with UNIX / LINUX

  10. Weaknesses • Can be error-prone – BAD mistakes don’t get caught by the compiler • C Programs can be difficult to understand • C Programs can be difficult to modify

  11. Program: pun.c /* Name: pun.c */ /* David L. Sonnier */ /* August 23 */ /* Pledged */ /* This program prints a REALLY BAD pun. */ #include <stdio.h> //main() is where program execution begins. main() { printf(“To C, or not to C: that is the question.\n”); }

More Related