Uploaded by josephbbyers16

Lecture 1 C programming

advertisement
Computer Programming
Lec 1:
Introductory Lecture
By:
Dr. Abdallah M A Saad
Agenda








What is programming?
Why is it important for you to study programming?
Course Info.
Contact.
Course syllabus.
How the computer program executes?
How to design a program?
Let’s Play a game !!!
2 / 25
Agenda








What is programming?
Why is it important for you to study programming?
Course Info.
Contact.
Course syllabus.
How the computer program executes?
How to design a program?
Let’s Play a game !!!
3 / 25
What is programming?



To program is to tell the machine what to do.
The instructions given to that machine follows a
language.
That language could be:

Machine languages.

Assembly languages.

High level languages.
4 / 25
What is programming?
Machine languages.

Machine dependent.

Error prone.

Hard to be understand.

Slow to develop.

Think in terms of machine rather than in terms of problem.
5 / 25
What is programming?

Assembly languages.

English like language.

Converted to machine .

language using Assembler.
6 / 25
What is programming?

High level languages.

Easy to understand.

Easy to learn.

Compilers convert
it to machine language.
7 / 25
Agenda








What is programming?
Why is it important for you to study programming?
Course Info.
Contact.
Course syllabus.
How the computer program executes?
How to design a program?
Let’s Play a game !!!
8 / 25
Why is it important for you to study programming?
9 / 25
Why is it important for you to study programming?
10 / 25
Why is it important for you to study programming?
11 / 25
Agenda








What is programming?
Why is it important for you to study programming?
Course Info.
Contact.
Course syllabus.
How the computer program executes?
How to design a program?
Let’s Play a game !!!
12 / 25
Course Info
Grading
●
●
●
●
Two projects ~ (5 + 10) Points
In lab activity ~ (15) Points
Midterm exam ~ (30) Points
Final exam ~ (90) Points
Textbook
●
●
●
Name: C How to Program
Edition: 8th
Authors: Paul Deitel and Harvey Deitel.
Class Hours are from 10:30 to 12:15 at room SB2-15
13 / 25
Agenda








What is programming?
Why is it important for you to study programming?
Course Info.
Contact.
Course syllabus.
How the computer program executes?
How to design a program?
Let’s Play a game !!!
14 / 25
Course requirements


My e-mail: abdallah.mohamed@feng.bu.edu.eg
To follow the course:

Open Microsoft Teams app;

Sign-in with your university edu mail;

Press on “Join or create a team” icon;

In the “Join a team with a code” Enter the following
code:
●
uac53b3
15 / 25
Agenda








What is programming?
Why is it important for you to study programming?
Course Info.
Contact.
Course syllabus.
How the computer program executes?
How to design a program?
Let’s Play a game !!!
16 / 25
Course syllabus










Introduction to programming.
Simple C program.
Control the program flow.
Functions.
Arrays.
Pointers.
Strings.
* I/O Formats.
C Structures.
Dealing with files.
17 / 25
Agenda








What is programming?
Why is it important for you to study programming?
Course Info.
Contact.
Course syllabus.
How the computer program executes?
How to design a program?
Let’s Play a game !!!
18 / 25
How the computer program executes?
.c
Compiler
2. Binary Code
.obj
Memory
3. Instructions
& Data
5. Write back
1. Source Code
Registers
19 / 25
4. Temp data
CPU
How the computer program executes?
20 / 25
Agenda








What is programming?
Why is it important for you to study programming?
Course Info.
Contact.
Course syllabus.
How the computer program executes?
How to design a program?
Let’s Play a game !!!
21 / 25
How to design a program?







Define the problem.
Analyse the problem.
Develop an algorithm.
Write the computer program.
Test and debug.
Document the program.
Maintain the program.
22 / 25
Agenda








What is programming?
Why is it important for you to study programming?
Course Info.
Contact.
Course syllabus.
How the computer program executes?
How to design a program?
Let’s Play a game !!!
23 / 25
How to design a program?
Write a simple program to catch the treasure in the room
fast with the least amount of steps, using only two
instructions; turn right, one step forward.
24 / 25
Many thanks for
your kind listening
Download