Chapter 1
Advertisement
This presentation is the property of its rightful owner.
1 / 11

Chapter 1 PowerPoint PPT Presentation

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/Effort10% Projects3 0% Tests40%

Related searches for Chapter 1

Download Presentation

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Chapter 1

Chapter 1

Introduction to Programming in C


Csc 140

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

Your Evaluation

  • Quizzes/Homework/Effort10%

  • Projects30%

  • Tests40%

  • Final Exam (2 hours) 20%


Introduction to c

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


Terminology

Terminology

  • Compiler

  • Source code

  • Object code

  • Program

  • Operating System

  • Editor


History of linux

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


History of c

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


Characteristics of c

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.


Strengths

Strengths

  • Efficiency

  • Portability

  • Power

  • Flexibility

  • Standard Library

  • Integration with UNIX / LINUX


Weaknesses

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


Program pun c

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”);

}


  • Login