introduction to computer programming in c

20
Introduction to Computer Programming in C www.ccsa126.wikispaces.com

Upload: reynold-mclaughlin

Post on 18-Dec-2015

230 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Computer Programming in C

Introduction to Computer

Programming in Cwww.ccsa126.wikispaces.com

Page 2: Introduction to Computer Programming in C

Lecture 1: Outline

• Introduction• Course Syllabus• Learning Objectives• Textbooks• Labs• Grading

• Installing / using Visual Studio 2010

Page 3: Introduction to Computer Programming in C

Introduction to programmingWhat is programming and programming

languages?

• Computers are really very dumb machines indeed because they do only what they are told to do.

• computer systems perform their operations on a very primitive level For example, know how to add one to a number or how to test whether a number is equal to zero.

• The basic operations of a computer system form what is known as the computer’s instruction set

Page 4: Introduction to Computer Programming in C

Cont

• To solve a problem using a computer, you must express the solution to the problem in terms of the instructions of the particular computer. • A computer program is just a collection of the instructions necessary

to solve a specific problem.• The approach or method that is used to solve the problem is known

as an algorithm.

Page 5: Introduction to Computer Programming in C

Example

• to develop a program that tests if a number is odd or even, the set of statements that solves the problem becomes the program.

• The method that is used to test if the number is even or odd is the algorithm.

• to develop a program to solve a particular problem,• first express the solution to the problem in terms of an algorithm and then• develop a program that implements that algorithm.

Page 6: Introduction to Computer Programming in C

cont

• the algorithm for solving the even/odd problem might be expressed as follows: • First, divide the number by two. If the remainder of the division is zero, the number is even;

otherwise, the number is odd.

• you can then proceed to write the instructions necessary to implement the algorithm on a particular computer system. These instructions would be expressed in

• the statements of a particular computer language, such as Visual Basic, Java, C++, or C.

Page 7: Introduction to Computer Programming in C

Programming in c Learning Objectives

•First course in Computer Programming• No previous knowledge is assumed !

•By the end of the course, students will:• Understand fundamental concepts of computer programming/imperative

structured programming languages• Design algorithms to solve (simple) problems• Use the C programming language

Page 8: Introduction to Computer Programming in C

Textbook• Stephen Kochan, Programming in C, 3rd Edition, Sams

Publishing, 2005• Main (first) textbook for this course• Teaches you how to program (in C)• Follows an approach suited for a first programming language

Page 9: Introduction to Computer Programming in C

Policies and Grading

• Lectures: can be interactive, with questions and interactive problem solving• Labs: mandatory attendance• Each lab session has a practical programming assignment to be done

individually in class • Read lecture slides and corresponding textbook chapters before attending the

lab session !• Final grade:

• 10 Programming Assignments 30%• Midterm Exam 25%• Final Exam 45%• Total 100%

Page 10: Introduction to Computer Programming in C

Course chapters [Kochan]

• Some Fundamentals• Compiling and Running your First C Program• Variables, Data Types, and Arithmetic Expressions • Input and output• Program Looping • Making Decisions • Working with Arrays • Working with Functions • Putting it all together

Page 11: Introduction to Computer Programming in C

IDE

Microsoft visual studio 2010 / any edition

Page 12: Introduction to Computer Programming in C

Installing VS 2010

• After downloading the installation exe file we should extract it

Page 13: Introduction to Computer Programming in C

Installing VS 2010

Page 14: Introduction to Computer Programming in C

Installing VS 2010

• Installation options

Page 15: Introduction to Computer Programming in C

Installing VS 2010

• Installation in progress

Page 16: Introduction to Computer Programming in C

Installing VS 2010

• We should exit all Microsoft running Apps

Page 17: Introduction to Computer Programming in C

Installing VS 2010

• We must check all the supported packages we need

Page 18: Introduction to Computer Programming in C

Installing VS 2010

• We must check all features we want to install

Page 19: Introduction to Computer Programming in C

Installing VS 2010

Page 20: Introduction to Computer Programming in C

Installing VS 2010