Computer Programming (CS-161)

Slides:



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

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Overview of Programming and Problem Solving ROBERT REAVES.
Introduction to Programming Lecture 2. Today’s Lecture Software Categories Software Categories System Software System Software Application Software Application.
Three types of computer languages
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 1 Introduction to C Programming. 1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language.
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.
C programming Language and Data Structure For DIT Students.
 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
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
“C” Programming Language What is language ? Language is medium of communication. If two persons want to communicate with each other, they have to use.
CSE 1340 Introduction to Computing Concepts Class 2.
Programming Design Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Spring 2005, Gülcihan Özdemir Dağ BIL104E: Introduction to Scientific and Engineering Computing, Spring Outline 1.1Introduction 1.2What Is a Computer?
UniMAP Sem1-08/09EKT120: Computer Programming1 Week 1 – Lecture 1.
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.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 1 February 8, 2005.
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++
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.
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: INTRODUCTION C++ Programming. CS 241 Course URL: Text Book: C++ How to Program, DETITEL & DEITEL, eighth Edition.
UniMAP Sem2-10/11 DKT121: Fundamental of Computer Programming1 Introduction to C – Part 1.
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.
1 Types of Programming Language (1) Three types of programming languages 1.Machine languages Strings of numbers giving machine specific instructions Example:
Structured programming 1 st stage By Heba.A Raheem Assist Lecturer College of Sciences/Computer Sciences Department.
Chapter 1 Introduction 2nd Semester H
CMPT 201 Computer Science II for Engineers
BASIC PROGRAMMING C SCP1103 (02)
 2001 Prentice Hall, Inc. All rights reserved.
Chapter 1: Introduction to computers and C++ Programming
Outline Introduction What Is a Computer? Computer Organization
Lecture 1: Introduction to JAVA
BASIC PROGRAMMING C SCP1103 (02)
Week 1 – Session 1 Pn. Yasmin Yacob 04 – KUKUM Sem2-06/07
Introduction to Programming
Instructor: Chien-Ho Ko
Chapter 1 – Introduction to Computers and C++ Programming
CS1123 Computer Programming Spring 2012 Instructor Ghufran Ahmed.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Intro to Programming Week # 1 Hardware / Software Lecture # 2
Java programming lecture one
Chapter 1: An Overview of Computers and Programming Languages
1.6 Machine Languages, Assembly Languages, and High-level Languages
' C ' PROGRAMMING SRM-MCA.
C++ Programming: From Problem Analysis to Program Design
Chapter 1: Introduction to Computers and Programming
CS190/295 Programming in Python for Life Sciences: Lecture 1
Introduction to C Programming
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
National Diploma in Computer Studies
Programming Fundamentals Lecture #3 Overview of Computer Programming
Outline Introduction What Is a Computer? Computer Organization
Chapter 1 – Introduction to Computers and C++ Programming
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
C programming Language
Introduction to Computer Programming
Chapter 1 – Introduction to Computers and C++ Programming
Chapter 1 Introduction to Programming
Basic Programming Lab C.
ICS103 Programming in C 1: Overview of Computers And Programming
Chapter 1 – Introduction to Computers and C++ Programming
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Computer Programming (CS-161) By Saqib Rasheed Lecture # 1

Instructor Saqib Rasheed Email: saqib.rasheed@mail.au.edu.pk Office: A-Block, 2nd floor Office Hours: 02:30PM to 03:30PM from Mon to Thur

Course Lab Engineer Mr. Zohaib / Mr. Omer Never hesitate to contact Lab instructors or me whenever you have some problem

Some Rules There is only one rule that will make the rest of the rules Raise your hand before asking any question and then WAIT for the permission Never sleep in the class Always communicate in the official communication language

Pre-Requisites Nothing

Books Object-Oriented Programming in C++”, 4th edition by Robert Lafore C++ How to Program”, 4th Edition by Deitel & Deitel PDF

Projects/Assignments Deadlines are always final Plenty on late submissions Submission guidelines must be followed. Do not submit compressed files. Submissions by email will NOT be accepted

Quizzes Announced Unannounced After the end of each topic

Dishonesty, Plagiarism in Quizzes, Assignments & Projects All parties involved in any kind of cheating in any exam/quiz or copying assignment will get zero in that task Both parties in case of copied assignments

Evaluation Breakdown Assignments 10 Quizzes Lab 20 Sessional Final 40 Total 100

Course Execution Two lectures of one hour & two hours every week 1 lab every week Group Home Page: CR of Class will make a yahoo group

Guidelines Read your email and messages on the course yahoo group regularly Start working on projects/assignments from first day. Remain attentive during the class. Do not sleep and do ask questions. I will ask questions very often!

Course Outline In this course you will learn C++ Structured programming Complete Course outline will be uploaded on yahoo group

Computers Have Two Main Parts Computer Hardware Computer Software

What is Computer Hardware? Computer Hardware is the physical part of the computer system, the machinery and equipment

Computer Software's Computer Software are programs that tell the computer what to do.

Input Devices Mouse Keyboard Scanner Mic

Output Devices Monitor / LCD Printer Speakers

Making a Computer

What is a Computer? Computer Hardware Software 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, and processing units Software Programs that run on a computer

How to Communicate with computer? Computer understands its own machine language (language of 0s and 1s). Language instructs computer to perform tasks. We need to understand computer’s language to communicate with it and to make it perform our desired functions. So we have….

Programming Language Set of rules and symbols used to construct a computer program A language used to interact with the computer

Machine Languages, Assembly Languages, and High-level Languages Three types of programming languages Machine languages Strings of numbers giving machine specific instructions Example: +1300042774 +1400593419 +1200274027 Assembly languages English-like abbreviations representing elementary computer operations (translated via assemblers) LOAD BASEPAY ADD OVERPAY STORE GROSSPAY

Machine Languages, Assembly Languages, and High-level Languages Three types of programming languages (continued) High-level languages Codes similar to everyday English Use mathematical notations (translated via compilers) Example: grossPay = basePay + overTimePay

What is C C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972. It was designed and written by a man named Dennis Ritchie. Influenced by ALGOL 60 (1960), CPL (Cambridge, 1963), BCPL (Martin Richard, 1967), B (Ken Thompson, 1970)

What is C….. Used to develop UNIX Used to write modern operating systems Hardware independent (portable) C began to replace the more familiar languages of that time like PL/I, ALGOL, etc Because it is reliable, simple and easy to use.

Steps in C/C++

The C++ Character Set A character denotes any alphabet, digit or special symbol used to represent information. We have 32 special symbols

Constants, Variables and Keywords The alphabets, numbers and special symbols when properly combined form constants, variables and keywords. A constant is an entity that doesn’t change. Whereas a variable is an entity that may change.

Types of C Constants C++ constants can be divided into two major categories: Primary Constants Secondary Constants These constants are further categorized as shown in Figure

Program Errors Syntax errors Related to the error in grammar/syntax of a language Run time errors during execution indicate bugs example: un-handled exceptions, memory overrun. Logical errors Bug in program that causes program to operate incorrectly, but not terminate.

Tools of the trade Editor Interpreter and Compilers Debuggers

Integrated Development Environment (IDE) It contains Editor Compilers Debugger Linkers Loaders

Loader puts program in memory. Preprocessor program processes the code. Loader puts program in memory. CPU takes each instruction and executes it, possibly storing new data values as the program executes. Compiler creates object code and stores it on disk. Linker links the object code with the libraries Loader Primary Memory Compiler Editor Preprocessor Linker   . Disk CPU Program is created in the editor and stored on disk.