1 Introduction to C Programming 計算機程式設計 2/22/2012 朱浩華.

Slides:



Advertisements
Similar presentations
Syllabus Instructor: Dr. Wesam Ashour
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Chapter 1 These slides for CSE 110 Sections are based in part on the textbook-authors’ slides, which are copyright by the authors. The authors state that.
INTRODUCTION T.Najah Al_Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System CS240.
COSC 120 Computer Programming
Introduction to Computers and Programming - Class 1 1 Introduction to Computers and Programming Professor Avi Rosenfeld.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
CSC 171 – FALL 2004 COMPUTER PROGRAMMING LECTURE 0 ADMINISTRATION.
Introduction to C++ Programming CS 117 Section 2 and KNET Sections Spring 2001 MWF 1:40-2:30.
1 CS150 Introduction to Computer Science 1 Professor: Chadd Williams
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
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.
CIS 260 Computer Programming I in C Prof. Timothy Arndt.
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
Ananda Gunawardena (“Guna”) Summer 2010 Lecture 1 - Introduction.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
chap1 Computer Programming Fall 2006 李秀惠
Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction Paul Tennent
18/30/2015CS150 Introduction to Computer Science 1 MWF 1:00 - 2:00 pm Professor: Shereen Khoja
Introduction COMP104: Fundamentals and Methodology.
Topics Introduction Hardware and Software How Computers Store Data
Winter 2015 COMP 2130 Introduction to Computer Systems Computing Science Thompson Rivers University Introduction and Overview.
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Instructor: Tina Tian. About me Office: RLC 203A Office Hours: Wednesday 1:30 - 4:30 PM or .
1 Introduction to Operating Systems 9/16/2008 Lecture #1.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
What is a Computer? An, electrical machine, that can be programmed to accept data (input), process it into useful information (output) and store it away.
Course Introduction Software Engineering
Introduction to Discrete Mathematics J. H. Wang Sep. 14, 2010.
1 計算機程式設計 Introduction to Computer Programming Lecture01: Introduction and Hello World 9/10/2012 Slides modified from Yin Lou, Cornell CS2022: Introduction.
1 8/29/05CS150 Introduction to Computer Science 1 Professor: Shereen Khoja
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
Bits & Bytes A bit is the smallest amount of memory used to store information. A bit is represented by either a “0” or a “1”. “Bit” is a contraction of.
C o n f i d e n t i a l 1 Course: BCA Semester: III Subject Code : BC 0042 Subject Name: Operating Systems Unit number : 1 Unit Title: Overview of Operating.
Introduction to Computer Programming (FIT-I pro) J. H. Wang Sep. 17, 2007.
 Instructor: Dr. Jason Nichols –  Office Hours: – 9:30-10:30 M/W/F or by appointment – Business Building.
Computer Engineering 1502 Advanced Digital Design Professor Donald Chiarulli Computer Science Dept Sennott Square
1 CS1430: Programming in C++ Section 2 Instructor: Qi Yang 213 Ullrich
Problem Solving Techniques Using Pascal Allen C.-H. Wu Department of Computer Science Tsing Hua University Hsinchu, Taiwan 30043, ROC
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Chapter 1 Getting Acquainted With Computers, Programs, and C++
Data Structures and Algorithms in Java AlaaEddin 2012.
Computer Programming for Engineers CMPSC 201C Fall 2000.
Operating Systems CMPSC 473 Introduction and Overview August 24, Lecture 1 Instructor: Bhuvan Urgaonkar.
Introduction to Programming By: Prof. Muhammad Abu Baker Siddique 2 nd Lecture 1.
CAP 107 Introduction To Computers. Welcome to CAP 107 Lecturer: Reham Al-Abdul Jabbar
CS140 – Computer Programming 1 Course Overview First Semester – Fall /1438 – 2016/2017 CS140 - Computer Programming 11.
INC 161 , CPE 100 Computer Programming
CMPT 201 Computer Science II for Engineers
Computer Engineering Department Islamic University of Gaza
Topics Introduction Hardware and Software How Computers Store Data
Introduction
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Programming COMP104: Fundamentals and Methodology Introduction.
CS190/295 Programming in Python for Life Sciences: Lecture 1
Mobile Development Workshop
Computers: Hardware and Software
Topics Introduction Hardware and Software How Computers Store Data
Professor: Shereen Khoja
Review of Previous Lesson
ICS103 Programming in C 1: Overview of Computers And Programming
Presentation transcript:

1 Introduction to C Programming 計算機程式設計 2/22/2012 朱浩華

Today’s Do List Course Overview (20 minutes) Setup computer accounts “Hello world!” CodeBlocks program (30 minutes) Overviews of Computers and Programming (50 minutes) 2

Course Goals First course in programming language for non-CSIE majors Learning Learn how to become a good C programmer –Able to use the programming skill to solve problems in your fields of studies. Computer language is a lot simpler than natural language such as Chinese (because machines are dump) –Limited vocabulary (< 100 constructs) –Simple grammar (plural, singular, …) –No ambiguity (e.g., present the present) 3

Course Topics Cover as much as C programming as possible (adjust based on progress) –Basics –Selection structures (if-else, switch) –Repetition and Loop (for, while, do) –Modular programming & pointers –Simple and Complex Data types (arrays) –Strings –Recursion –Structure and Union Types –File processing ( ) –Linked list 4

Prerequisite Good typing skill Non CSIE major Read some English 5

Textbook Problem Solving and Program Design in C, 6 th Edition, Jeri R. Hanly and Eliot B. Koffman 6

Course Format Weekly take-home programming assignments (13) Midterm exam –Fixed date 4/25/2012 in class –Offer once only Final exam –Fixed date: 6/20/2012 in class –Offer once only 7

Grading (Tentative) Tentative means that it may be changed later 33%: 13 assignments 33%: Midterm exam 33%: Final exam 8

Teaching Staff Instructor: –“Hao” Chu ( 朱浩華 ) –Office: CSIE 518 –Weekly office hours: Thu 2-3:30 pm TA: –TimeString ( 何柏樟 ) – the master programmer –Office: CSIE 336 –Weekly office hours: ? 9

Means of Communications Course homepage: Send to TA or me Come to office hours 10

Lecture Notes Available on the course homepage prior to each lecture –Complement, not replacement for attending lecture –We will do plenty of programming practices during classes 11

12 Roster call to see who are here and how many extra students we can take

13 Questions on the Administrative Things?

Before writing your 1 st program Hand out computer accounts What is a program? –A sequence of instructions that the computer executes –What is and isn’t a program? Will use CodeBlocks to write programs. –IDE (Integrated Development Environment) –A program that makes it easy for you to write programs –Actually contains many programs A word processor: like MS Words A compiler: translate your text program into machine-executable code A debugger: test the correctness of a program 14

“Hello World” with CodeBlocks Make sure your computer has CodeBlocks installed Switch to programming screen –Create a new project called “helloworld” –Type in the “Hello World” program –Click on Build -> “Build and run” 15

16 Overview of Computers and Programs Chapter 1

Computer Hardware 17

PC Motherboard 18

Hardware vs. Software “Hello World” software program executed on the PC hardware 19

A bit of Hardware - memory What is memory? –Consists of memory cells – like a pill box –Each memory cell stores content or data (0s and 1s) –Each memory cell has an address (like the day) Bits and Bytes –A bit stores one binary digits (0 or 1). –A byte = 8 bits (one char, like A) 20

1-21 How big is 4GB (Gigabyte)? 4 * 10 9 bytes

Memory storage units 22 TermAbbrev.Equivalent toComparison to Power of 10 Bitb ByteB8 bits KilobyteKB1024 (2 10 ) bytes> 10 3 MegabyteMB1,048,576 (2 20 ) bytes > 10 6 GigabyteGB1,073,741,824 (2 30 ) bytes > 10 9 TerabyteTB1,099,511,627,776 (2 40 ) bytes > googol10 100

Main memory vs. secondary storage Main memory: data loss after power loss Secondary storage (harddisk, flash): no data loss after power loss 23

Directory vs. file 24

What is CPU (Central Processing Unit)? 25 It executes instructions (e.g., in your program)

Computer Languages 26 High-level languages –More like English, easier to program –C, Java, Objective-C, … Machine language –Made up of 0/1s, not easy to read Compiler (the build command in CodeBlocks) –Translate high-level language to machine language