Chapter 1 Introduction to C Programming. 1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language.

Slides:



Advertisements
Similar presentations
EC-111 Algorithms & Computing Lecture #1 Instructor: Jahan Zeb Department of Computer Engineering (DCE) College of E&ME NUST.
Advertisements

Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Systems Software.
COSC 120 Computer Programming
Three types of computer languages
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Chapter 1: An Overview of Computers and Programming Languages
Introduction to Computer Programming CSC 1401: Introduction to Programming with Java Lecture 2 Wanda M. Kunkle.
 2003 Prentice Hall, Inc. All rights reserved. 1 Machine Languages, Assembly Languages, and High-level Languages Three types of computer languages 1.Machine.
Chapter 1: An Overview of Computers and Programming Languages
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Topic 1: Introduction to Computers and Programming
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
1 Chapter Two Introduction to the Programming Language C.
CHAPTER 1: INTORDUCTION TO C LANGUAGE
BY: SACHIN SHRIVASTAVA Operating System By : Sachin Shrivastava 1.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Computer Programming-1 CSC 111 Chapter 1 : Introduction.
1 Chapter-01 Introduction to Computers and C++ Programming.
CCSA 221 Programming in C CHAPTER 2 SOME FUNDAMENTALS 1 ALHANOUF ALAMR.
COMPUTER SCIENCE I C++ INTRODUCTION
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Chapter 1 An Overview of Computers and Programming Languages.
“C” Programming Language What is language ? Language is medium of communication. If two persons want to communicate with each other, they have to use.
Programming Design Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introduction to Computers Outline 1.1Introduction.
Chapter 1: An Overview of Computers and Programming Languages
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 1 February 8, 2005.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
1 Programming Fundamentals How to Program in C++ How to Program in C++
COMPUTER PROGRAMMING. Computer programming the objective of the module to gain the necessary skills to develop a computer program using one of the high.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
CS-303 Introduction to Programming
CHAPTER 1: Introduction to Computers and Programming CSEB113 PRINCIPLES of PROGRAMMING CSEB134 PROGRAMMING I by Badariah Solemon 1BS (May 2012)
1 Chapter 1 Programming Languages Evolution of Programming Languages To run a Java program: Java instructions need to be translated into an intermediate.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
CHAPTER 1.1 INTRODUCTION TO COMPUTERS AND C++ Dr. Shady Yehia Elmashad.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Chapter 1 An Overview of Computers and Programming Languages.
Introduction to Computer Programming using Fortran 77.
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
1 Types of Programming Language (1) Three types of programming languages 1.Machine languages Strings of numbers giving machine specific instructions Example:
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
THE SOFTWARE Computers need clear-cut instructions to tell them what to do, how to do, and when to do. A set of instructions to carry out these functions.
Introduction to Programming By: Prof. Muhammad Abu Baker Siddique 2 nd Lecture 1.
Chapter 1 Introduction 2nd Semester H
Topic 2: Hardware and Software
Operating System Interface between a user and the computer hardware
System Programming and administration
Instructor: Chien-Ho Ko
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Computer Science I CSC 135.
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Chapter 1 Introduction(1.1)
Programming Fundamentals Lecture #3 Overview of Computer Programming
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Presentation transcript:

Chapter 1 Introduction to C Programming

1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language. how to identify problems Specify such problems Analyze them Design a method of solution for them

1.2 COMPUTER FUNDAMENTALS A special-purpose computer is a computer that is designed for a particular function. General-purpose computers. They are capable of storing and running different set of instructions, accepting input data for each set of instruction in different forms, and producing output that satisfies various user requirements.

Hardware Main memory, central processing unit, input devices, output devices, and secondary memory devices.

Systems software Operating system : manages the overall operation of the computer system Text editor : to create a text Preprocessor : checks the C program file for special instructions. Language translator : converts a computer program written using a high-level programming language, to an equivalent program that is in machine language.

Source program : a program that is written in a high-level language Object program : a program that consists of machine language Interpreter : translates one instruction at a time and immediately executes Compiler : translates the entire source program

Standard library contains object codes of some standard programs ( called standard library functions) Linker : combines the object codes of the needed standard functions with your object program and creates an executable machine language program, called the load module. The load module is saved in disk storage.

Loader : loads the executable load module into the main memory for execution. Applications software : includes programs that are developed using systems software in order to solve problems.

1.3 PROGRAMMING LANGUAGES Special-purpose programming language is designed for a particular class of applications. For example, Structured Query Language (SQL) General-purpose programming language can be used to obtain solutions for many different types of problems.

Machine Languages Readily understood by the computer. Have some shortcomings: 1.Difficult to learn, instruction is a binary string of zeros and ones. 2.Even relatively simple problems require a large number of machine language instructions. 3.Are machine-dependent.

Assembly Languages Consist of English-like abbreviations. L1,GROSSPAY S1,TAX ST1,NETPAY

Assemblers, to convert assembly language programs to machine code, have some shortcomings : 1. Programs written in assembly languages are lengthy. 2. Each computer type has its own assembly language.

High-level Languages English-like, single instruction can be written to corresponds to many operations at the machine level. For example, netpay = grosspay – tax; High-level programming languages have been standardized. Quite portable.

The Evolution of the C and C++ Programming Languages Developed at Bell Laboratories in the early 1970s as a system implementation language. C combines the convenience of high-level programming languages with the power of assembly languages. C++ programming language as an extension of the C language. C++ makes object-oriented programming.

1.4 THE C PROGRAMMING ENVIRONMENT Language includes features that enable use to carry out certain basic operations. A library is a collection of routines not part of the language. Two kinds of libraries: 1.Standard libraries 2.Programmer-defined libraries

Stdio library, used for interactive input and output operations; the math library, which contains some standard mathematical functions To use a standard library, say, the stdio library #include

1.5 HOW TO USE THE COMPUTER TO RUN C PROGRAMS Accessing the Computer Using the Editor to prepare Program and Data Files Compiling, Linking, and Executing C Programs Correcting Compilations and Execution Errors

1.6 EXAMPLE PROGRAM 1:A C Program that balances Your Checkbook for Debit Type Transactions