Fundamentals of Programming
Lecture 1 Hamed Rasifard
1
Fundamentals of Programming Lecture 1 Hamed Rasifard 1 Outline - - PowerPoint PPT Presentation
Fundamentals of Programming Lecture 1 Hamed Rasifard 1 Outline Introduction Course Policies Course Organization Grading Policy, Late Policy, Reevaluating Academic Honestly Course Overview 2 Introduction My name is Hamed Rasifard M.Sc.
Lecture 1 Hamed Rasifard
1
Introduction Course Policies
Course Organization Grading Policy, Late Policy, Reevaluating Academic Honestly Course Overview
2
My name is Hamed Rasifard M.Sc. in Computer Engineering
3
You just follow course book and lectures Course book: C How to Program, 6th Edition
4
Final Exam: 7 grades Midterm Exam: 5 grades Assignments: 4 grades Quiz: 2 grades Project: 2 grades Class Activity: +1 grades
5
Late Homework
One day late will cost you 25%, two days 50%, and three days 75% No homework will accept after three days
Cheating and Copying
First time you caught you will get a zero for the task at hand Second time you caught you will get a -100 for the task Third time you caught you will fail the course
6
Missed grades or summation errors will be evaluated Discuss concerns with your solution with me Penalty Policy
7
Any collaboration is accepted Gilligans Island Rule(an inspiration of Professor Larry Ruzzo
from University of Washington): This rule says that you are free to meet with fellow students(s) and discuss assignments with them. Writing on a board or shared piece of paper is acceptable during the meeting; however, you may not take any written (electronic or
assignment is supposed to be an individual effort. After the meeting, engage in half hour of mind-numbing activity (like watching an episode of Gilligan's Island), before starting to work on the
you learned from the meeting, by yourself, using your own brain.
8
Basic Computer Concepts Calculation in Computer Systems Programming Principles Input/Output Format in C Algorithm, Flowchart, and Sudo-Code Control Structures
9
Functions Test and troubleshooting Arrays Pointers Characters and String Abstract Data Types, and Classes
10
11
A set of devices capable of
Performing computation Make decision Repeat fast
12
Hardware
Central Process Unit(CPU) Main Memory I/O Units Data and Control Busses Hard Drive
Software
Operating System Applications
13
BCPL (Basic Combined Programming Language) designed by Martin Richards of the University of Cambridge in 1966. Intended for writing Compilers for other languages(suitable for writing Bootstrapping) The BCPL Language is Clean, Powerful, and Portable
14
BCPL influenced B B was developed in Bell Lab, in 1969 B influenced C C was invented and first implemented by Dennis Ritchie, in 1970s The ANSI C standard was adopted in 1989(C89)
15
C89 was adopted by ISO so it is called ANSI/ISO Standard C89 became base document for Standard C++ C99 is adopted in 1999
16
Allow manipulation of Bits, Bytes, and Addresses Has several built-in data types Almost no run-time error checking No strict type compatibility checking between parameter and argument Has small set of Keywords
17
C is Structured, not Block-Structured compartmentalization of code and data Offers Several Programming possibilities Functions are main structural component Code block is another component
18
Was created, influenced, and field-tested by working programmers gives the programmer what them wants Few restrictions Few complaints Structured Language Stand-alone functions
19
Efficiency Portability Power Flexibility Standard Library Integrated with Unix
20
C programs can be:
Error-Prone Difficult to Understand Difficult to modify
21
auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void default goto sizeof volatile do if static while
22
23
Global declarations int main(parameter list) { statement sequence } return-type f1(parameter list) { statement sequence } return-type f2(parameter list) { statement sequence } . . . return-type fN(parameter list) { statement sequence }
24
25
#include <stdio.h> int main(void) { printf(“To C, or not to C: that is the question.\n”); return 0; }
26
Preprocessing Compiling Linking
27