Tuesday, December 05, 2006 - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Tuesday, December 05, 2006

Description:

General knowledge of what computer hardware / software is. Basic C Program Structure. ... is the name of library that contains definition of routines that ... – PowerPoint PPT presentation

Number of Views:82
Avg rating:3.0/5.0
Slides: 31
Provided by: Erud
Category:

less

Transcript and Presenter's Notes

Title: Tuesday, December 05, 2006


1
Tuesday, December 05, 2006
  • I hear and I forget,
  • I see and I remember,
  • I do and I understand
  • -Chinese Proverb

2
CS 192 / CMPE 191
  • First course in programming using C

3
CS192 / CMPE 191 Problem Solving and Computer
Programming
  • Course Outline
  • Course Website URL
  • http//suraj.lums.edu.pk/cs192w06/
  • Information about the course, office hours,
    contact information, announcements,
    lecture-slides, tutorials, source code
  • \\indus\Common\cs192w06
  • Overview of C

4
  • Make use of office hours.

5
  • Course builds on top of previous discussion.
  • Dont hesitate to ask questions in class.

6
  • 5 minute rule!

7
  • What is a program?
  • -

8
  • C programming language.
  • High level language

9
  • What does the computer understand?

10
  • What do we need here?

11
myprogram.c
include ltiostream.hgt int main()
coutltltHello\n
Type your C program into a text file It is
human-readable
myprogram.exe
machine-readable
12
  • Compiler
  • Source code
  • Object code

13
  • What happens when you start a program?

14
  • C
  • Whats with the name?

15

Some history
  • In 1970s
  • Developed by Dennis Ritchie of ATT Bell
    Laboratories
  • It was first used for writing UNIX operating
    system
  • Widely used in programmer community
  • ANSI (American National Standards Institution)
    standard C (1983)

16
Advantages of C
  • Built-in power
  • Efficiency
  • Flexibility
  • Library routines

17
From C to C (1980 Bell Labs)
  • Reason Increasing complexity of programs
  • Bjarne Stroustrup of ATT Bell Laboratories
    developed C in 1980s.
  • Most of C is a subset of C

18
From C to C (1980 Bell Labs)
  • High performance system software is constructed
    using C
  • C Enhancement to C

19
  • Real programmers language
  • Also it is

20
  • a lot of
  • FUN!

21
  • Computer Science Fundamentals (CS 111)
  • Object Oriented Programming (CS 292)
  • Data Structures (CS 213)
  • Operating Systems (CS 381)

22
My assumptions
  • Knowledge of
  • A text editor
  • Files
  • Some experience of using Windows operating
    system.
  • General knowledge of what computer hardware /
    software is.

23
  • Basic C Program Structure.
  • Statements

24
  • Input / Output (I/O)

25
  • Compiler
  • Linker

26
  • include ltiostream.hgt
  • int main( )
  • cout ltlt"Welcome to CS192/CMPE191"
  • return 0

27
  • Include directives

28
  • iostream is the name of library that contains
    definition of routines that handle input and
    output.
  • iostream.h is a file that contains information
    about this library

29
Welcome to CS192/CMPE191
30
Comments have two forms in C //Single line
comments /Multi-line comments/ / comments
ignored by compiler / // comments required by
some organizations!
Write a Comment
User Comments (0)
About PowerShow.com