Introducing C Chapter 1 Copyright © 2008 W. W. Norton & Company.

Slides:



Advertisements
Similar presentations
C language was developed in early 1970s by Dennis Ritchie at Bell Laboratories to implement the UNIX operating system on the PDP-11 manufactured by DEC.
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Transition from C to C++ …and a Review of Basic Problem Solving.
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
CSE1301 Computer Programming Lecture 4: C Primitives I.
Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Brief History of C and Unix Systems Programming Concepts.
Team Badass.  Dennis M. Ritchie  1967 He became an employee at Bell Labs  Mid 1960s BCPL was developed by Martin Richards for the Multics Project 
C: A VERY BRIEF HISTORY & STANDARDS © 1/4.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Welcome In The World Of ‘C’.  TEXT BOOK: Programming in ANCI ‘C By: E Balagurusamy. TMH  Reference Books: 1) The ‘C Programming Language By: Kernighan.
“C” Programming Language What is language ? Language is medium of communication. If two persons want to communicate with each other, they have to use.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
Chapter 2: C Fundamentals Copyright © 2008 W. W. Norton & Company. All rights reserved. 1 Chapter 1 Introducing C.
Introduction By: Dr. Javad Razjouyan. Programming Languages.
CIS 15 - Advanced Programming Techniques Using C Professor Yedidyah Langsam 525NE icq: AOL IM: BCCISProf.
C for Java Programmers Tomasz Müldner Copyright:  Addison-Wesley Publishing Company, 2000 Introduction to C Muldner, Chapters 1, 2.
CSCI 130 Chapter 1. History of C Bell Telephone Laboratories (1972) Dennis Ritchie (also created UNIX) A - B - C.
Language C (1) By Randa. Generalities: Types of programmes: -operating system ”système d’exploitation” like Windows XP, Windows 98, Unix, Linux… -programmes.
C Programming Language Bill Jensen CS 354 May, 3 rd 2007.
Introduction to C++ Programming Language
Introduction to Programming Lecture No. 1. Books  Deitel & Deitel :– C++ How to Program  Kernighan and Ritchie:- The C Programming Language.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
EG280 Computer Science for Engineers Fundamental Concepts Chapter 1.
CGS 3460 Course Web Site –Get CISE Account –Submit via Web Ct –Late Policy –50% Per Day –Missubmission policy –Academic Honesty –Class Scheduling.
Program & Programming Languages. Introduction to Programming Programming is the process of writing a computer program in a language that the computer.
Programming Fundamentals Lecture No. 2. Course Objectives Objectives of this course are three fold 1. To appreciate the need for a programming language.
Chapter 1: Introducing C Copyright © 2008 W. W. Norton & Company. All rights reserved. 1 Chapter 1 Introducing C.
COP 3275 Chapter 01 course website: Jonathan C.L. Liu, Ph.D. CISE Department University of Florida.
1. Introducing C Lecturer: Chih Hung Wang Fall 2010 Programming Design (I) Modified from: C Programming – A Modern Approach 2008 W. W. Norton & Company.
 Getting ready to code Lecture 1 Match 4, Course syllabus 
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 1 – Introduction to C.
Introduction to C Programming Language. History of C  C was evolved by Dennis Ritchie at AT&T Bell Laboratories in early of 1970s  Successor of: ALGOL.
An overview of C Language. Overview of C C language is a general purpose and structured programming language developed by 'Dennis Ritchie' at AT &T's.
BY:HIRA FARMAN Course:. LECTURE # 02 BY:HIRA FARMAN.
Introduction to Programming
CSC141 Introduction to Computer Programming Programming Language.
Fundamentals of Programming C++ Programming Language CS 1400 Dennis A. Fairclough Version 1.1 C++ Programming Language CS 1400 Dennis A. Fairclough Version.
HIGH-LEVEL LANGUAGE PROGRAMMING PARADIGMS. Programming languages come in many forms or 'paradigms'. Each form of language offers advantages over other.
From Algorithms to Programs Both are sets of instructions on how to do a task Algorithm: –talking to humans, easy to understand –in plain (English) language.
Chapter 1: Introducing C Copyright © 2008 W. W. Norton & Company. All rights reserved. 1 Chapter 1 Introducing C.
C language--Introduction. History 1970: B by Ken Thompson at AT&T Bell Lab 1972: C by Dennis Ritchie and Ken Tompson at At&T Bell Lab for UNIX 1978: “The.
Main Part of a Computer.
Chapter Goals Describe the application development process and the role of methodologies, models, and tools Compare and contrast programming language generations.
CMPT 201 Computer Science II for Engineers
A Synopsis of Their History
Object Oriented Programming
Sections Basic Concepts of Programming
1. INTRODUCING C.
LESSON 1 Introduction to Programming Language
Welcome to CSE1002.
Computer System and Programming
History of ‘C’ Root of the morden language is ALGOL It’s first
Intro to Programming Week # 1 Hardware / Software Lecture # 2
Introducing C Chapter 1 Copyright © 2008 W. W. Norton & Company.
Overview of C.
CGS 3460 Course Web Site Get CISE Account.
Introduction to C Programming Language
Welcome In The World Of ‘C’.  TEXT BOOK: Programming in ANSI ‘C By: E Balagurusamy. TMH  Reference Books: 1) The ‘C Programming Language By: Kernighan.
Развој софтвера 2.
Chapter 4 Computer Software McGraw-Hill/Irwin
Introducing C Chapter 1 Copyright © 2008 W. W. Norton & Company.
Introduction to Computer Programming
Introducing C Chapter 1 Copyright © 2008 W. W. Norton & Company.
C Programming Language
How can I learn C language?
WELCOME TO ALL STUDENTS IN MY CLASS: Hope You All Enjoyed C#
Presentation transcript:

Introducing C Chapter 1 Copyright © 2008 W. W. Norton & Company. All rights reserved.

Origins of C C is a by-product of UNIX, developed at Bell Laboratories by Ken Thompson, Dennis Ritchie, and others. Thompson designed a small language named B. B was based on BCPL, a systems programming language developed in the mid-1960s. Copyright © 2008 W. W. Norton & Company. All rights reserved.

Origins of C By 1971, Ritchie began to develop an extended version of B. He called his language NB (“New B”) at first. As the language began to diverge more from B, he changed its name to C. The language was stable enough by 1973 that UNIX could be rewritten in C. Copyright © 2008 W. W. Norton & Company. All rights reserved.

Standardization of C K&R C C89/C90 C99 Described in Kernighan and Ritchie, The C Programming Language (1978) De facto standard C89/C90 ANSI standard X3.159-1989 (completed in 1988; formally approved in December 1989) International standard ISO/IEC 9899:1990 C99 International standard ISO/IEC 9899:1999 Incorporates changes from Amendment 1 (1995) Copyright © 2008 W. W. Norton & Company. All rights reserved.

C-Based Languages C++ includes all the features of C, but adds classes and other features to support object-oriented programming. Java is based on C++ and therefore inherits many C features. C# is a more recent language derived from C++ and Java. Perl has adopted many of the features of C. Copyright © 2008 W. W. Norton & Company. All rights reserved.

Properties of C Low-level: machine-level concept including address, bitwise operators, operation close to CPU’s built-in instructions (like ++, --) Small: to keep C small, C heavily relies on a library of standard functions. (not procedure, subroutine, method) Permissive: C assume you know what you are doing. You have wider degree of latitude than other languages. No mandated error-checking feature. Copyright © 2008 W. W. Norton & Company. All rights reserved.

Strengths of C Efficiency Portability Power Flexibility Standard library Integration with UNIX Copyright © 2008 W. W. Norton & Company. All rights reserved.

Weaknesses of C Programs can be error-prone. Programs can be difficult to understand. Programs can be difficult to modify. Copyright © 2008 W. W. Norton & Company. All rights reserved.

Effective Use of C Learn how to avoid pitfalls. Use software tools (lint, debuggers) to make programs more reliable. Take advantage of existing code libraries. Adopt a sensible set of coding conventions. Avoid “tricks” and overly complex code. Stick to the standard. Copyright © 2008 W. W. Norton & Company. All rights reserved.

Obfuscated C: N-Queen v, i, j, k, l, s, a[99]; main() { for(scanf("%d",&s);*a-s;v=a[j*=v]-a[i],k=i<s,j+=(v=j<s&& (!k&&!!printf(2+"\n\n%c"-(!l<<!j)," #Q"[l^v?(l^j)&1:2])&& ++l||a[i]<s&&v&&v-i+j&&v+i-j))&&!(l%=s),v||(i==j?a[i+=k]=0 :++a[i])>=s*k&&++a[--i]) ; } Copyright © 2008 W. W. Norton & Company. All rights reserved.