Sunteți pe pagina 1din 39

{ HELLO WORLD }

Math 153, Lecture 0


Introduction to Computer Programming I
{ Welcome to MATH 153 }

• Course Description?

• Computer Programming I
Student Learning Outcomes
• familiarize with basic concepts of computer programming and
developer tools.
• present the syntax and semantics of the “C” language as well as
data types offered by the language
• write their own programs using standard language
infrastructure regardless of the hardware or software platform
Requirements and Grade Components
Lecture (60%)
3 Long Exams 60%
Quizzes/Assignments/Attendance 10%
Recitation 10%
Final Exam 20%
Laboratory (40%)
Total 100%

Passing 60%
Requirements and Grade Components
• Make-up exams
• will be offered for valid reasons (e.g. fatal illness, death of a relative,
accident).
• may be different from the regular exam in format and content.
• Failure to complete requirements = INC
• No grade of 1.0 will be given if an absence (excused or
unexcused) is incurred
• More than 5 absences = DROP
Consultation Time
• Monday, Thursday
• 09:00 am – 11:00 am
• 02:30 pm – 04:00 pm

• Tuesday, Friday
• 10:00 am – 01:00 pm
Online Platform
• Login to your UP Google Accounts
• Go to https://classroom.google.com/
• Join Class (Math 153) and enter class code

Class codes:
• Section 1: e5wnjj

• Section 2: pr1z8fd
Course Outline
C Introduction
• Keywords and Identifiers
• Variables and Constants
• C Data Types
• C Input/Output
• C Operators
Course Outline
C Flow Control
• If-else
• For loop
• Do..while loop
• Break and continue
• Switch case
• Goto
• Control Flow Examples
Course Outline
C Functions
• Programming Functions
• User-defined Functions
• Function Types
• Recursion
• Storage Class

--- First Long Exam ----


Course Outline
C Programming Arrays
• Programming Arrays
• Multidimensional Arrays
• Arrays and Function
Course Outline
C Programming Pointers
• Programming Pointers
• Pointers and Arrays
• Pointers and Functions
• Memory Allocation
• Array and Pointer Examples

-- SECOND LONG EXAM --


Course Outline
C Programming Strings
• Programming String
• String Functions
• String Examples

C Programming Files
• Files input/Output
Course Outline
Additional Topics
• Enumeration
• Preprocessors
• Library Functions
References

I will not be following any particular book for this course but
what I will be teaching is available in any of the standard c
programming textbooks.
Some Issues
• Final exam
• Exam Schedule
• Attendance and Tardiness
• Silent Killers : Quizzes and Recitation
Lecture and Lab
Not always synched
• Learn technologies in lab while discussing concepts in lecture
• Won't focus much on teaching technologies
Math 153 Survival Tips
• Advanced reading*
• Pay attention and recite in class
• Learn, don't memorize
• Do your lab requirements on time
• Balance individual and team work
Why C?
Easy to Learn Can handle low-level activities

Can be compiled in a variety


Produces Efficient Programs of platforms
Real World Applications
Operating Systems
Real World Applications
Development of new languages
Real World Applications
Computation Platforms
Real World Applications
Embedded Systems
Real World Applications
Graphics and Games
A look at C
• Very flexible and powerful programming language originally
designed in the early 1970s
• It is famous as the language the UNIX OS was written in, and
was specifically designed for this
• However its use has now spread way beyond that field and it is
currently very popular
Making C Run
• You actually write the program using some form of text editor
• C is a compiled programming language
• The computer cannot understand the language directly
• So a program called a compiler converts the c into a machine
code instructions which do the job
Advantages of C
• With C, you can write code which runs quickly and your code is
very close to the hardware which means you can access low-
level facilities in your computer quite easily
• The function libraries are standard for all versions of C – they
can be used on all systems
Disadvantages of C
• Some programs will appear totally valid as far as the compiler is
concerned but will not work and may even cause your
computer to stop
• C allows you to write very terse code but it has side effect of
making them hard to understand
Creating C Programs
• Initially it is best if we start creating programs on paper
• Otherwise, sitting in front of the keyboard, there is a great
temptation to start pressing keys and typing something in
which might work
• You will certainly end up with something which almost works,
which you will then spend hours fiddling with it to get going
• If you had sat down with a pencil and worked out the solution
first you would probably get into a working system in around
half a time
Installation Requirements
• Download and install MinGW Package
• You can download from
https://sourceforge.net/projects/mingw/files/
First Method and Recommended
• Install Codeblocks
• https://sourceforge.net/projects/mingw/files/latest/download
?source=files

• Check
http://www.sci.brooklyn.cuny.edu/~goetz/codeblocks/codeblo
cks-instructions.pdf for instructions
Second Method
Installation
• Open Control Panel
• Search “edit environment variables”
• Click Environment Variables
Installation
• Click on the PATH
Installation
• Click edit, new, and paste address. Click OK
Installation
• Download Sublime Text Editor
• You can use notepad but not recommended
Installation
• Check if it works. Open sublime and type in..
Installation
• Compile your work. Open command prompt.

------
------
------
End of Lecture 0

S-ar putea să vă placă și