EC201 - Fundamental Programmin G: Unit 1 - Introductory To Programming
EC201 - Fundamental Programmin G: Unit 1 - Introductory To Programming
FUNDAMENTAL
PROGRAMMIN
G
UNIT 1 INTRODUCTORY TO
PROGRAMMING
PROGRAMME
A set of instructions that enables the
computer to perform a certain task.
OR
A sequence of instructions that a
computer can interpret and
execute. The program required
several hundred lines of code.
PROGRAMMER
A
PROGRAMMING LANGUAGE
A
Programming
QBasic
QBasic
Like
Example:
PRINT "Hello, World!"
Visual Basic
Visual
Because
Example:
C
C
Example
#include <stdio.h>
int main(void)
{
printf("hello, world\n");
return 0;
}
C++
C++
It
Example
#include <iostream>
int main()
{
std::cout << "Hello, world!\n";
}
Three
MODULAR PROGRAMMING
is
Conceptually,
Modules
The
The
Programming
Many
Basics of a Typical C
Environment
Editor
Preprocessor
Phases of C Programs:
1. Edit
2. Preprocess
3. Compile
4. Link
5. Load
6. Execute
Program is created in
the editor and stored
on disk.
Preprocessor program
processes the code.
Disk
Disk
Compiler
Disk
Linker
Disk
Prima ry
Memory
Loader
Disk
..
..
..
Prima ry
Memory
CPU
..
..
..
14
Compiler creates
object code and stores
it on disk.
Linker links the
object code with the
libraries,creates
a.out and stores it
on disk
Loader puts program
in memory.
SUMMARY
Terms in programming :
Programme
Programmer
Programming
language
Various types of
programming language:
C language
C++ language
BASIC
QBASIC
Visual Studio
Pascal
Types of programming:
Structured programming
Modular programming
Object-oriented programming