- INTRODUCTION TO STRUCTURED PROGRAMMING – Click to download
- PROGRAM DESIGN AND DEVELOPMENT – Click to download
- PROGRAM STRUCTURE – Click to download
- CONTROL STRUCTURES – Click to download
- SUBPROGRAMS IN C – Click to download
- DATA STRUCTURES – Click to download
- FILE HANDLING – Click to download
- SOFTWARE DOCUMENTATION – Click to download
INTRODUCTION TO STRUCTURED PROGRAMMING
Programming means to convert problem solutions into instructions for the computer. It also refers to the process of developing and implementing various sets of instructions to enable a computer to do a certain task.
Structured programming (sometimes known as modular programming) is an approach to writing programs that are easier to test, debug, modify and maintain by enforcing a modular approach which breaks a large complex problem into sub-problems.
A programming language is a vocabulary and set of grammatical rules designed for instructing a computer to perform specific tasks.
HISTORY OF PROGRAMMING LANGUAGES
First-Generation Programming Languages – Machine Language A first-generation of programming languages includes machine-level programming languages.
These languages were introduced in the 1940s and had the following characteristics:
- Instructions were entered directly in binary format (1s and 0s) and therefore they were tedious and error prone. Programmers had to design their code by hand then transfer it to a computer using a punch card, punch tape or flicking switches.
- Instructions were executed directly by a computer’s central processing unit (CPU) i.e. they were executed very fast.
- Memory management was done manually.
- Programs were very difficult to edit and debug.
- Used to code simple programs only.
Second-Generation Programming Languages (2GL) – Low Level Programming Languages/Assembly Languages
They were introduced to mitigate the error prone and excessively difficult nature of binary programming.
- Introduced in the 1950s
- Improved on first generation by providing human readable source code which must be compiled/assembled into machine code (binary instructions) before it can be executed by a CPU
- Specific to platform architecture i.e. 2GL source code is not portable across processors or processing environments.
- Designed to support logical structure and debugging.
By using codes resembling English, programming becomes much easier. The use of these mnemonic codes such as LDA for load and STA for store means the code is easier to read and write.
To convert an assembly code program into object code to run on a computer requires an Assembler and each line of assembly can be replaced by the equivalent one line of object (machine) code: