Vous êtes sur la page 1sur 3

MIDLANDS STATE UNIVERSITY

FACULTY OF SCIENCE AND TECHNOLOGY


DEPARTMENT OF COMPUTER SCIENCE AND INFORMATION SYSTEMS

COMPUTER PROGRAMMING FOR ENGINEERS (HCSE111) COURSE


OUTLINE
PERIOD: 2018
Lecturer: Mr. T. T. Gotora
Email ID: gotorat@staff.msu.ac.zw/ trust.gotora@yahoo.com
Contact No: 0718002497

Preamble
This course covers the introduction to programming using the procedural paradigm and looks at
the differences in the programming paradigms. It also shows how programming can be used to
solve real life problems. Various basic concepts of programming will be covered which include
data types, variables, constants, operators, parameters, functions, control structures, arrays, testing,
debugging, input and output operations,. Programs will be compiled and ran using C language.
Modularity will also be demonstrated using functions, structures and external files.

Aim:
This course provides students with a comprehensive study of the C programming language.
Classroom lectures stress the strengths of C, which provide programmers with the means of writing
efficient, maintainable, and portable code. The lectures are supplemented with non-trivial lab
exercises.

Learning Objectives
By the end of this course students should be able to:
 Write C programs that are non-trivial.
 Use the variety of data types appropriate to specific programming problems.
 Utilize the modular features of the language.
 Demonstrate efficiency and readability.
 Demonstrate the use of the various control flow constructs.
 Use arrays as part of the software solution.
 Utilize pointers to efficiently solve problems.
 Include the structure data type as part of the solution.
 Create their own data types.
 Use functions from the portable C library.

Unit I: Programming Fundamentals (Week 1-2: 4 Lectures)


Programming definition, Low Level Vs High level Programming Languages, Types of Translators
(Compiler, Interpreter and Assembler), Procedural Vs Object Oriented Programming, History of
C, Characteristics of C, Sample Program, Components of a C Program, Compiling and Executing
a C Program, Data Types, Variables, Constants, Comments, Naming Conventions for C Variables,
Printing and Initializing Variables, Keywords, Expressions, Operators, Input (printf()) and Output
(scanf()), Control flow constructs.

Unit II: Control Flow Constructs and Operators (Week 3-4: 4 Lectures)
Algorithms, Pseudocode, Flowcharts. Selection Statements; if…, if else…, else if…, switch.
Iteration Statements; while…, for…, do…while, break and continue. Nested Statements. Operator
Precedence, Assignment Operators, Conditional Operators, Logical Operators, Bit Wise Operators
Increment and Decrement Operators, Operator Examples.

Unit III: Functions and Strings (Week 5-6: 4 Lectures)


Function Declaration, Function Definition, Function Prototype, Arguments and Parameters;
Passing Parameters By Value, Passing Parameters By Reference, Variable Scope (Global and
Local), Invoking Functions in main (), Built in functions; e.g. isDigit(),check(), atoi(). Math Functions.
Strings: Fundamental concepts, Aggregate Operations, String functions; strlen(), case functions,
strcpy(), getline(), strcmp(), strstr().

Unit IV: Arrays and Pointers (Week 7-8: 4 Lectures)


Arrays; Declaration, Array Dimensions, an array as an Argument to a Function, String arrays.
Pointers; Fundamental concepts, Pointer operators and operations, Changing an Argument with a
Function Call, Pointer Arithmetic, Array Traversal, String Functions with Pointers, Pointer
Difference, Prototypes for String Parameters, Relationship Between an Array and a Pointer, The
Pointer Notation *p++, Dynamic Storage Allocation – malloc, Functions Returning a Pointer,
Initialization of Pointers, gets - a Function Returning a Pointer, Array of Character Pointers, Two
Dimensional Arrays vs. Array of Pointers, Command Line Arguments, Pointers to Pointers,
Practice with Pointers and Function Pointers.

Unit V: Structures and C Preprocessors (Week 9-10: 4 Lectures)


Fundamental Concepts, Describing a Structure, Creating Structures, Operations on Structures,
Functions Returning Structures, Passing Structures to Functions, Pointers to Structures, Array of
Structures, Functions Returning a Pointer to a Structure, typedef - New Name for an Existing Type,
Bit Fields, unions, Non-Homogeneous Arrays, Enumerations.
Unit VI: File IO and Advanced C Programming (Week 11-12: 4 Lectures)
System Calls vs. Library Calls, Opening Disk Files (fopen), Closing a File, Reading a File, Writing a File,
I/O Library Functions, Servicing Errors - errno.h, feof, Information About Files; stat Function, File
Existence. Telling time; time, ctime, localtime. C Preprocessors; #define, #include, #ifdef, #ifndef. Creating
and using header files. Compiling Over Several Files, Function Scope, File Scope, Program Scope, Local
static, register and extern, Object Files, Libraries. Character Testing Functions, exit and atexit signal,
memcpy and memset, qsort. Binary Search – bsearch.

Tools
C compiler
Code blocks IDE 16.01+
Text Editor

Methodology
Lectures, Research, Unannounced Quizzes, Tutorials and Group work
Course Assessment
Course Work (40%)
Tests 10%
Written assignments/Presentations 5%
Practicals 25%

Final Examination (60%)

Reference Books
Kernighan, B.W. & Ritchie, D.M.The C Programming Language. Prentice Hall
Vine M.A. C Programming for the Absolute Beginner. Thompson Course Technology, 2007

Internet Sources
www.tutorialspoint.com/cprogramming [Accessed on 06 August 2018]
www.programiz.com/c-programming [Accessed on 06 August 2018]
https://fresh2refresh.com/c-programming/ [Accessed on 07 August 2018]

Vous aimerez peut-être aussi