SE5120: Programming in C (15 credits)

Menu 1:

(This web site:) (Homepage:)
Index

(Pages on
this web site:)

Home Page

About Me

Links

Catalog of notes


(My lecture
notes on
this web site:)

JavaScript

PR515 (JavaScript
cs/ss scripting)

PR655 (JavaScript
cs/ss advanced)

CS/SS scripting

Java Applets

SE5120 (C)

PP (C++)

OO (C++)

PR611 (C++)

Delphi (OO)


(Program samples:)

2002 Search engines

1999-2003 Calculators


(My computer
research
on this web site:)

Computing

Search Engine


Menu 2:

(Other web sites about:)


(Seismograph:)

alarm.gq.nu

alert.1hwy.com

capsule.20m.com

magnocraft.20fr.com

totalizm.fanspace.com

jp.7h.com


(Magnocraft:)

magnocraft.20fr.com

capsule.20m.com

jp.7h.com

totalizm.fanspace.com

alarm.gq.nu

alert.1hwy.com


(Oscillatory Chamber:)

capsule.20m.com

magnocraft.20fr.com

jp.7h.com

totalizm.fanspace.com

alarm.gq.nu

alert.1hwy.com


(Totalizm:)

totalizm.fanspace.com

jp.7h.com

magnocraft.20fr.com

capsule.20m.com

alarm.gq.nu

alert.1hwy.com


(Computing:)

(Web sites with my lecturing notes - from 2004 till 2005:)

pajak.orcon.net.nz

pajak.ownsthis.com

free.7host03.com/Pajak


(Web sites with
my old lecturing notes - from 1999
till 2003:)

Pajak.20m.com

Pajak.20fr.com


(My web site on
web tutorials:)

Websitemaker.20m.com


(All-in-one
prototypes:)

totalizm.fanspace.com

jp.7h.com

magnocraft.20fr.com

capsule.20m.com

alarm.gq.nu

alert.1hwy.com

Pajak.20m.com

Pajak.20fr.com


Notes for SE5120, by Dr Jan Pajak


SE5120 course carries 15 credits, or 150 learning hours. It extends for two terms, or one semester, means for 16 weeks in total. It represents stage 1 of programming course in C language. It is composed of two parts, namely training part 1 (10 weeks), and project part 2 (6 weeks). The lecture notes and example programs that I am presenting here are prepared for the Borland C++ Builder version 6 (but utilised as C language compiler).
Notice that:
- In order to run or to download any of these items, simply click on the underlined part of the description of this item!
- For further instructions see the end of this web page.
- Click the button BACK (from the browser) to return to the previous web page.

Course outline:

Course Outline (for block 3 and 4 of 2003).

Theory Content:

Theory content of this course is based on the materials handed out to students. However, the preliminary use of following textbook would be helpful (this textbook is to be used for SE5220 - which represents stage 2 of this course):
[1] Deitel and Deitel: C++ How to Program, 4th Edition, Prentice Hall, ISBN 0-13-111881-1.

Practical laboratory content:

(2003 - part 1) Notes for the instruction part of SE5120 (i.e. first 10 weeks):

Exercise 1 (Introduction; interactive processing, general structure of a C program, “hello world” C program.)

Exercise 2 (Iterative statements: “while”, “do while”, and “for” loops.)

Exercise 3 (If statements. Relational operators. Compound conditions. Switch statement.)

Exercise 4 (Functions. Pass by value, pass by reference.)

Exercise 5 (Disk I/O and file handling in C.)

Exercise 6 (Console I/O formatting in C.)

Exercise 7 (Identifiers, data types, and C variables.)

Exercise 8 (String handling and string functions in C.)



(2003 - part 2) Notes for the project part of SE5120 (i.e. another 6 weeks):

Project specification (Project 1, C langauge).

Appendix B1 to Project 1 (Feasibility study.)

Appendix B2 to Project 1 (Program specification.)

Appendix B3 to Project 1 (Program design.)

Appendix B4 to Project 1 (Programming.)

Appendix B5 to Project 1 (Program testing.)

Appendix B6 to Project 1 (Program presentation.)

2003 Assessments:

(2003 - part 1 Assessment) Examples of assessment for part 1 of SE5120 (i.e. first 10 weeks):

Assignment 1 for C. (SE5120).

Assignment 2 for C. (SE5120).

Sample problems for test 1. (SE5120)

Assignment 3 for C. (SE5120).

Sample problems for test 2. (SE5120)

2003 Sample solutions:

(2003 - teaching solutions) Examples of solutions for lectures and exercises - part 1 of SE5120 (i.e. first 10 weeks):

Exercise 1:

Program hello.c example of source code. Console C source code: (basic solution for hello world program).

Program hello example of EXE file. Executable program C for a hello world program.

Program size_int.c example of source code. Console C source code: (basic solution for size_int.c program).

Program size_int example of EXE file. Executable file for a C program named size_int.

Program divisors.c example of source code. Console C source code: (basic solution for divisors.c program).

Program divisors example of EXE file. Executable file for a C program named divisors.

Exercise 2:

Times table program - example of source code. Console C source code.

Times table program - example of EXE file. Executable file for a C program.

Menu program - example of source code. Console C source code.

Menu program - example of EXE file. Executable file for this program in C.



Instructions on how to use this web page:

(1) Each C++ program is provided here in two versions, namely (a) as a source code (*.cpp), which is prepered for the Borland C++ Builder 5 or 6 (but in most of cases it also works on Microsoft Visual Studio 6 C++), and (b) as an executable version of a given C program (*.exe). Each one of these two versions needs to be downloaded separately.
(2) In order to download to your computer any of these two versions (*.cpp or/and *.exe) of a given C solution, click on this version, and then follow the instructions that appear in the downloading window.
(3) To return to this web page, click on the Back button on the tool palette of your browser.
(4) Some solutions are compressed into standard zip files. Therefore, you need to unzip them first before they are executed or compiled.
(5) If you wish to see any other related web pages - see the Links Page (e.g. the so-called "Blue Book" with prescriptions for PR621 (former PR21n) courses addressed here, are available at the web page http://www.naccq.ac.nz/bb_view/bbpre.html).
(6) Address for correspondence (July 2005): Dr Jan Pajak, P.O. Box 33250, Petone 6340, New Zealand.

The latest update of this web page: 23 July 2005.
2765