Ceng 230 Programming with C

Slides:



Advertisements
Similar presentations
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Advertisements

Lecture 1: Overview of Computers & Programming
Overview of Programming and Problem Solving ROBERT REAVES.
1 Hardware - devices for Input. 2 Hardware - devices for Input Processing.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
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.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Introduction to Computers
COMP 14 Introduction to Programming
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
CIS 260 Computer Programming I in C Prof. Timothy Arndt.
 2000 Prentice Hall, Inc. All rights reserved. 1 Introduction to Computers and C Programming Outline Introduction What Is a Computer? Computer Organization.
CS102 Introduction to Computer Programming
CS1430: Programming in C++ Section 2 Instructor: Qi Yang 213 Ullrich
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved.
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI CSCI.
1 CSC 1401 S1 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University
CSCI 125 & 161 Lecture 2 Martin van Bommel. Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk.
The Computer Systems By : Prabir Nandi Computer Instructor KV Lumding.
Chapter Two Hardware Basics: Inside the Box. ©1999 Addison Wesley Longman2.2 Chapter Outline What Computers Do A Bit About Bits The Computer’s Core: CPU.
Spring 2005, Gülcihan Özdemir Dağ BIL104E: Introduction to Scientific and Engineering Computing, Spring Outline 1.1Introduction 1.2What Is a Computer?
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
CISC105 General Computer Science Class 1 – 6/5/2006.
Introduction to Computers
1 Overview of Programming and Problem Solving Chapter 1.
Introduction to Computer Systems and the Java Programming Language.
© 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
Computer Science Theory & Introduction Week 1 Lecture Material Doug Hogan Penn State University CMPSC 201 – C++ Programming for Engineers.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 1 Introduction to Computers, the Internet and.
GCSE Information Technology Computer Systems 2 Hardware is the name that is given to any part of a computer that you can actually touch. An individual.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
BAT3O / BTX4C. Definition: A computer is an electronic machine that 1) takes in data and instructions (input) 2) works with the data (processing) 3) puts.
1 MIS 131 Introduction to Algorithms and Programming 2015/2016 Fall - Chapter 1 -
1 Programming Fundamentals How to Program in C++ How to Program in C++
Computer Science Theory & Introduction Week 1 Lecture Material – F'13 Revision Doug Hogan Penn State University CMPSC 201 – C++ Programming for Engineers.
Computer Organization & Assembly Language © by DR. M. Amer.
Computer Organization. The digital computer is a digital system that performs various computational tasks Digital computer use binary number system which.
1 CS1430: Programming in C++ Section 2 Instructor: Qi Yang 213 Ullrich
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
The Computer System CS 103: Computers and Application Software.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
CS 125 Lecture 2 Martin van Bommel. Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk drive Software.
Chapter 1 An Overview of Computers and Programming Languages.
1 Types of Programming Language (1) Three types of programming languages 1.Machine languages Strings of numbers giving machine specific instructions Example:
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Introduction To Computer Programming – 1A Computer Parts, Words, and Definition Herriman High School.
Introduction to Programming. Key terms  CPU  I/O Devices  Main memory  Secondary memory  Operating system  User interface  Application  GUI 
Introduction to Computers - Hardware
Java Programming: From the Ground Up
Computer basics.
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Computer Science I CSC 135.
Computer Electronic device Accepts data - input
Computer Electronic device Accepts data - input
Computer Electronic device Accepts data - input
Introduction to Computer Programming
ICS103 Programming in C 1: Overview of Computers And Programming
Presentation transcript:

Ceng 230 Programming with C Tansel Dökeroğlu Computer Engineering Department Spring 2015 tanseldoker@yahoo.com.tr

Web pages Official web site of the course ceng230.ceng.metu.edu.tr My personal C lecture web site: http://www.ceng.metu.edu.tr/~e1451970/

"All the high-school students will be taught the fundamentals of computer technology will become proficient in binary arithmetic and will be trained to perfection in the use of the computer languages “ Science fiction writer Isaac Asimov's Predictions For 2014 From in 1960s

• COMPUTER – Device capable of performing computations and making logical decisions – Computers process data under the control of sets of instructions called computer programs • Hardware – Various devices comprising a computer – Keyboard, screen, mouse, disks, memory, CD-ROM, printer, and processing units • Software – Programs that run on a computer – Microsoft Windows, Microsoft Office, Internet Explorer

Conceptual Structure of a Computer System

CPU (Central Processing Unit) • Process and manipulate information stored in memory. • It can be divided into two units: CU (Control Unit) and ALU (Arithmetic Logic Unit) • CU coordinates activities of the computer and controls other devices of computer. • ALU processes arithmetical and logical instructions.

Bit and Byte A bit is a single numeric value, either '1' or '0', that encodes a single unit of digital information. A byte is a sequence of bits; usually eight bits equal one byte. Byte = 8 bits KiloByte (KB) = 1,024 Bytes MegaBytes (MB) = 1,024 KB GigaByte (GB) = 1,024 MB TeraByte (TB) = 1,024 GB

Memory • Store information (data + instructions) • A sequence of memory cells. • Store, retrieve, update – changing the pattern of 0 and 1s in memory cells – copying these patterns into some internal registers • Stored information in memory is volatile.

Binary System Hardware can only deal with binary digits, 0 and 1. Must represent all numbers, integers or floating point, positive or negative, by binary digits, called bits. Can devise electronic circuits to perform arithmetic operations: add, subtract, multiply and divide, on binary numbers.

Binary System Decimal system: made of 10 digits, {0,1,2, . . . , 9} 41 = 4×101 + 1×100 255 = 2×102 + 5×101 + 5×100 Binary system: made of two digits, {0,1} 00101001 = 0×27 + 0×26 + 1×25 + 0×24 +1×23 + 0×22 + 0×21 + 1×20 = 32 + 8 +1 = 41 11111111 = 255, largest number with 8 binary digits, 28-1

American Standard Code for Information Interchange ASCII Table American Standard Code for Information Interchange

History of C • C – Developed by Denis M. Ritchie at AT&T Bell Labs in 1972 as a systems programming language – Used to develop UNIX – Used to write modern operating systems – Hardware independent (portable) • Standardization – Many slight variations of C existed, and were incompatible – Committee formed to create a "unambiguous, machine independent“ definition – Standard created in 1989, updated in 1999

Other High-level Languages – C++ • Superset of C, and provides object-oriented capabilities – Java • Create web pages with dynamic and interactive content – Fortran • Used for scientific and engineering applications – Cobol • Used to manipulate large amounts of data – Pascal • Intended for academic use

Flow chart of a program (Algorithm) In mathematics and computer science, an algorithm is a step-by-step procedure for calculations.

development environment C language development environment

Devc++ to write C code http://www.bloodshed.net/devcpp.html

printf( "Welcome to \%d", (3/2) ); Output is : 1

! exclamation mark

Use search engines while studying for errors or sample codes

Useful links for C programming http://www.programmingsimplified.com/c-program-examples http://www.tutorialspoint.com/cprogramming/ http://www.wikihow.com/Learn-to-Program-in-C http://www.programiz.com/c-programming/examples

Homework Install BloodshedC++ compiler to your computer Write a C program that prints your name, surname and mail adress to the screen. Send the C file to my address (tanseldoker@yahoo.com.tr) Until next week

No cell phones

Never give up