Académique Documents
Professionnel Documents
Culture Documents
Introduction
Joy Mukherjee
1 / 37
Books
3 / 37
Evaluation Procedure in the PDS Theory
Examination % of Marks
Attendance 10%
Class test 10%
Mid-semester 30%
End-semester 50%
Table: Evaluation: B.Tech. 1st Year (Section III) for 2017 Autumn Semester
4 / 37
Evaluation Procedure in the PDS Laboratory
Examination % of Marks
Attendance 10%
Regular Performance 50%
Class Test 40%
Table: Evaluation: B.Tech. 1st Year (Section III) for 2017 Autumn Semester
5 / 37
Outline
2 Types of problems
6 Write-Compile-Execute
8 First C Program
6 / 37
Outline
2 Types of problems
6 Write-Compile-Execute
8 First C Program
7 / 37
Digital Computer & Computation
8 / 37
Outline
2 Types of problems
6 Write-Compile-Execute
8 First C Program
9 / 37
Types of Problems
Functional problems
Decision problems
Search problems
Optimization problems
10 / 37
Functional Problems
11 / 37
Decision Problems
12 / 37
Search Problems
13 / 37
Optimization Problems
14 / 37
Outline
2 Types of problems
6 Write-Compile-Execute
8 First C Program
15 / 37
Basic Components of a Digital Computer
John von Neumann first gives a concrete idea of stored program
computers.
Input devices
These are the devices using which the user provides input instances.
In a programmable computer, input devices are also used to input
programs. Examples: keyboard, mouse.
Output devices
These devices notify the user about the outputs of a computation.
Example: screen, printer.
17 / 37
Central Processing Unit (CPU)
18 / 37
External Memory
20 / 37
Outline
2 Types of problems
6 Write-Compile-Execute
8 First C Program
21 / 37
Data Area
22 / 37
Instruction Area
23 / 37
Execution of a Program
24 / 37
The Fetch-Decode-Execute Cycle
25 / 37
The Fetch-Decode-Execute Cycle (cont.)
26 / 37
The Fetch-Decode-Execute Cycle (cont.)
27 / 37
Outline
2 Types of problems
6 Write-Compile-Execute
8 First C Program
28 / 37
Machine Language
Expressed in binary.
Directly understood by the computer.
Not portable; varies from one machine type to another. Program
written for one type of machine will not run on another type of
machine.
Difficult to use in writing programs.
29 / 37
Assembly Language
30 / 37
HLL Executable
31 / 37
Outline
2 Types of problems
6 Write-Compile-Execute
8 First C Program
32 / 37
Write-Compile-Execute
33 / 37
Outline
2 Types of problems
6 Write-Compile-Execute
8 First C Program
34 / 37
Some Programmer Jargons
Language: The core part of C central to writing C code such as
keyword, syntactic construction.
Source code: The C program you type through your keybord.
Object code: Taking source code and making a program that the
computer can understand (object code). Object code is the input to
the linker.
Library: Added functions for C programming which are used to do
certain tasks.
Header file: Files ending in .h which are included at the start of
source code.
Linker: A program that links separately compiled modules into one
program. It also combines the functions in the Standard C library
with the code that you wrote. The output of the linker is an
executable program.
Executable: The compiled program that the computer can run.
Compile time: The time during which your program is being compiled.
Run time: The time during which your program is executing.
35 / 37
Outline
2 Types of problems
6 Write-Compile-Execute
8 First C Program
36 / 37
First.c
This program takes no input, but outputs the string Hello world! in a
line.
#include <stdio.h>
int main ()
{
printf(Hello world!\n);
return 0;
}
37 / 37