Learning Outcomes:
On completion of this module students should be able to:
1. Solve simple problems by writing computer programs
2. Be aware of most basic programming topics
3. Be familiar with the basics of the C programming language
Indicative Module Content:
Introduction: what is a computer? what is an algorithm? what is a program? An engineering problem-solving methodology. General format of a C program.
Fundamentals of C: variables and constants. Assignment statements. Formatted input/output from/to the keyboard/screen. Basic datatypes. Type casting. Keywords and identifiers. Arithmetic, relational, and logical operators; conditionals. Operator precedence.
Loops: for, while, do-while. Infinite and unbounded loops.
Algorithm development and stepwise refinement: flowcharts and pseudocode. Sources and types of errors in C programming.
Functions: C library functions. Programmer- defined functions: definition, declaration, function call. Formal and actual function
parameters: call by value. Storage class and scope.
1-D arrays: declaration and initialization. Simple linear searching with arrays. Passing arrays to functions: call by address.