0% found this document useful (0 votes)
4 views125 pages

Programming in C_Module 1_v1

The document outlines a module on Introduction to Programming and C, covering fundamental concepts of computer science, problem-solving techniques, and the structure and execution of C programs. It includes details on computer types, components, software types, input devices, and operating systems. The module aims to equip students with essential programming knowledge and skills, emphasizing the significance of algorithms and the programming environment.

Uploaded by

abhishek.mitsgwl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views125 pages

Programming in C_Module 1_v1

The document outlines a module on Introduction to Programming and C, covering fundamental concepts of computer science, problem-solving techniques, and the structure and execution of C programs. It includes details on computer types, components, software types, input devices, and operating systems. The module aims to equip students with essential programming knowledge and skills, emphasizing the significance of algorithms and the programming environment.

Uploaded by

abhishek.mitsgwl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 125

Subject: Programming in C

Module Number: 01

Module Name: Introduction to Programming


and C

1
Introduction to Programming
and C
Syllabus
Module 1: Introduction to Programming and C
Introduction to computers and computer-based problem solving, Algorithm and Flowchart, Top-
down design and stepwise refinement, Programming environment –Assemblers, Compilers,
Interpreters. Introduction to C, Structure of a C program, preprocessor directives, Compiling and
executing C programs.

2
Introduction to Programming
and C
AIM:
The aim of this module is to make students understand the fundamental concepts of computer
science, including problem-solving techniques, programming and programming language.

3
Introduction to Programming
and C
Objectives:
The objectives of this module are as follows:
•Explain computer-based problem solving.
•Demonstrate the usage of algorithms in computer problem solving.
•Understand the programming environment.
•Describe the structure and execution of C programs.

4
Introduction to Programming
and C
Outcomes:
At the end of this module, the students will know about:
•Illustrate computer-based problem solving.
•Discuss the usage of algorithms in computer problem solving.
•Understand the programming environment.
•Identify the structure and execution of C programs.

5
Introduction to Programming
and C
Table of Content:
• Introduction to Computers
• Introduction to Computer based problem solving
• Algorithms and Flowcharts
• Top-down design and stepwise refinement
• Programming environment – Assemblers, Compilers, Interpreters
• Introduction to C
• Structure of a C program
• Preprocessor directives
• Compiling and executing C programs

6
Introduction to Programming
and C
COMPUTER TYPES
There are 4 types of computers:
1.Microcomputer
2.Mini computer
3.Mainframe computer
4.Supercomputer

1. Microcomputer:
• Desktop computers, laptops, tablets and smartphones are called microcomputers.
• These computers are cheaper than other types of computers.
• Microcomputers are specially designed for general usage like entertainment, education and
work purposes.
• Examples: Laptops, PCs, and Smartphones. 7
Introduction to Programming
and C
Introduction to Computers
• Computers are electronic devices that can perform various operations on data, such as
inputting, processing, storing and outputting. They are used extensively in almost every field,
including business, education, entertainment and communication.
• Computers have several essential components, including the central processing unit (CPU),
which is responsible for executing instructions, the memory (RAM) that stores data and
instructions temporarily, the storage devices (hard drives, solid-state drives) that store data
permanently, and input/output devices (keyboard, mouse, monitor, speakers) that allow users
to interact with the computer.
• The first computers were enormous, room-sized machines that used vacuum tubes to perform
calculations. However, advancements in technology have resulted in the development of
8
smaller and more powerful computers, including desktops, laptops, tablets and smartphones.
Introduction to Programming
and C
2. Mini computer:
• Mini computers are used by small organizations and firms. The mini-computers are
called as “midrange computers”.
• These computers are not designed for a single user. One department of a large
company or organization uses mini-computers for specific purposes.
Example: K-202, Texas Instrument TI-990, SDS-92, IBM Midrange Computers.
3. Mainframe Computer:
• The mainframe is very large in size and is an expensive computer.
• It is capable of supporting hundreds or even thousands of users simultaneously.
• The mainframe executes many programs concurrently and supports many
simultaneous executions of programs.
Example: IBM4300, Hitachi’s Z800. 9
Introduction to Programming
and C
4. Supercomputer
• Supercomputers are one of the fastest computers currently available.
• Supercomputers are very expensive and are employed for specialized applications
such as data processing.
• NASA uses supercomputers for launching space shuttles, controlling them, and for
space exploration purposes.

10
Introduction to Programming
and C
COMPONENTS OF A COMPUTER

11
Introduction to Programming
and C
COMPONENTS OF A COMPUTER
Input Unit:
•This unit contains devices with the help of which we enter data into the computer.
•This unit creates a link between the user and the computer.
•The input devices translate the information into a form understandable by the computer.

Central Processing Unit:


•CPU is considered as the brain of the computer. CPU performs all types of data processing
operations.
•It stores data, intermediate results, and instructions (program). It controls the operation of all
parts of the computer.

12
Introduction to Programming
and C
CPU itself has the following three components −
1. ALU (Arithmetic Logic Unit)
2. Memory Unit
3. Control Unit

4. Arithmetic Logic Unit (ALU)


• Arithmetic Section: Function of arithmetic section is to perform arithmetic operations
like addition, subtraction, multiplication, and division. All complex operations are
done by making repetitive use of the above operations.
• Logic Section: Function of logic section is to perform logic operations such as
comparing, selecting, matching, and merging of data.
13
Introduction to Programming
and C

2. Memory Unit:
• This unit can store instructions, data, and intermediate results.This unit supplies
information to other units of the computer when needed.
• It is also known as internal storage unit or the main memory or the primary storage or
Random Access Memory (RAM).
• Primary memory and secondary memory are two types of memories in the computer.
• All inputs and outputs are transmitted through the main memory.

14
Introduction to Programming
and C

3. Control Unit:
This unit controls the operations of all parts of the computer but does not carry out any actual
data processing operations.
• It is responsible for controlling the transfer of data and instructions among other units
of a computer.
• It obtains the instructions from the memory, interprets them, and directs the operation
of the computer.
• It communicates with Input/Output devices for the transfer of data or results from
storage.
• It does not process or store data.
15
Introduction to Programming
and C

4. Output Unit:
•The output unit consists of devices with the help of which we get the information from the
computer
•This unit is a link between the computer and the users.
•Output devices translate the computer's output into a form understandable by the users.

16
Introduction to Programming
and C
SOFTWARE AND ITS TYPES
Definition: Software is a set of programs, which is designed to perform a well-defined function.
A program is a sequence of instructions written to solve a particular problem.
There are two types of software
i.System Software
ii.Application Software

17
Introduction to Programming
and C

i. System Software: The system software is a collection of programs designed to operate, control
and extend the processing capabilities of the computer itself. System software is generally
prepared by the computer manufactures. These software products comprise of programs written
in low-level languages, which interact with the hardware at a very basic level. System software
serves as the interface between the hardware and the end users. Example: Operating System,
compilers, Interpreter and Assemblers.

ii. Application Software: Application software products are designed to satisfy a particular need
of a particular environment. All software applications developed in Software Company can come
under the application software. Application software may consist of single or collection of
programs. 18
Introduction to Programming
and C
INPUT DEVICES AND ITS TYPES:
Input devices are used to give input to the systems. Input devices are,
•Keyboard
•Mouse
•Joystick
•Light pen
•Track Ball
•Track Ball

19
Introduction to Programming
and C
Keyboard
The keyboard is the most common and very
popular input device which helps to input data
to the computer. Keyboards are of two sizes
84 keys or 101/102 keys, but now keyboards
with 104 keys or 108 keys are also available
for Windows and the Internet.

20
Introduction to Programming
and C

21
Introduction to Programming
and C
Mouse
The mouse is the most popular pointing device. It is a very famous cursor-control device having
a small palm size box with a round ball at its base, which senses the movement of the mouse and
sends corresponding signals to the CPU when the mouse buttons are pressed. Generally, it has
two buttons called the left and the right button and a wheel is present between the buttons. A
mouse can be used to control the position of the cursor on the screen, but it cannot be used to
enter text into the computer.
Joystick
The joystick is also a pointing device, which is used to move the cursor position on a monitor
screen. It is a stick having a spherical ball at its both lower and upper ends. The lower spherical
ball moves in a socket. The joystick can be moved in all four directions.
22
Introduction to Programming
and C
Light Pen
Light pen is a pointing device similar to a pen. It is used to select a displayed menu item or draw
pictures on the monitor screen. It consists of a photocell and an optical system placed in a small
tube. When the tip of a light pen is moved over the monitor screen and the pen button is pressed,
its photocell sensing element detects the screen location and sends the corresponding signal to
the CPU.
Trackball
Trackball is an input device that is mostly used in notebook or laptop computer, instead of a
mouse. This is a ball which is half inserted and by moving fingers on the ball, the pointer can be
moved. Since the whole device is not moved, a trackball requires less space than a mouse. A
trackball comes in various shapes like a ball, a button, or a square.
23
Introduction to Programming
and C
Scanner
Scanner is an input device, which works more like a photocopy machine. It is used when some
information is available on paper and it is to be transferred to the hard disk of the Scanner
Scanner is an input device, which works more like a photocopy machine. It is used when some
information is available on paper and it is to be transferred to the hard disk of the computer for
further manipulation. Scanner captures images from the source which are then converted into a
digital form that can be stored on the disk. These images can be edited before they are printed.

24
Introduction to Programming
and C
OPERATING SYSTEM
• The Operating System is a program with the following features −
• An operating system is a program that acts as an interface between the software and the
computer hardware. It is an integrated set of specialized programs used to manage overall
resources and operations of the computer.
• It is specialized software that controls and monitors the execution of all other programs that
reside in the computer, including application programs and other system software. Objectives
of Operating System

25
Introduction to Programming
and C

The objectives of the operating system are −


•To make the computer system convenient to use in an efficient manner.
•To hide the details of the hardware resources from the users.
•To provide users a convenient interface to use the computer system.
• To act as an intermediary between the hardware and its users, making it easier for the users to
access and use other resources.
• To manage the resources of a computer system

26
Introduction to Programming
and C
Characteristics of Operating System.
Here is a list of some of the most prominent characteristic features of Operating Systems −
Memory Management − Keeps track of the primary memory, i.e. what part of it is in use by
whom, what part is not in use, etc. and allocates the memory when a process or program requests it.
Processor Management − Allocates the processor (CPU) to a process and deallocates the
processor when it is no longer required.
Device Management − Keeps track of all the devices. This is also called I/O controller that decides
which process gets the device, when, and for how much time.
File Management − Allocates and deallocates the resources and decides who gets the resources.
Security − Prevents unauthorized access to programs and data by means of passwords and other
similar techniques.
27
Introduction to Programming
and C
Characteristics of Operating System.
Job Accounting − Keeps track of time and resources used by various jobs and/or users.
Control over System Performance − Records delays between the request for a service and
from the system.
Interaction with the Operators − Interaction may take place via the console of the computer in
the form of instructions. The Operating System acknowledges the same, does the corresponding
action, and informs the operation by a display screen.
Error-detecting Aids − Production of dumps, traces, error messages, and other debugging and
error-detecting methods.
Coordination between Other Software and Users − Coordination and assignment of
compilers, interpreters, assemblers, and other software to the various users of the computer
28
systems.
Introduction to Programming
and C
COMPUTER MEMORY
A memory is just like a human brain. It is used to store data and instructions.
Computer memory is the storage space in the computer, where data is to be processed and
instructions required for processing are stored.
The memory is divided into large number of small parts called cells.
Each location or cell has a unique address.
For example, if the computer has 64k words, then this memory unit has 64 * 1024 = 65536
memory locations. The address of these locations varies from 0 to 65535.
There are 3 types of memory
1.Cache Memory
2.Primary Memory
29
•Secondary Memory
Introduction to Programming
and C
1. Cache Memory
Cache memory is a very high speed semiconductor memory which can speed up the CPU.
It acts as a buffer between the CPU and the main memory.
It is used to hold those parts of data and program which are most frequently used by the CPU.
The parts of data and programs are transferred from the disk to cache memory by the operating
system, from where the CPU can access them.

Advantages: Disadvantages:
1.Cache memory is faster than main memory. Cache memory has limited
2.It consumes less access time as compared to main memory. capacity.
It stores the program that can be executed within a short 1.It is very expensive.
period of time.
30
3.It stores data for temporary use.
Introduction to Programming
and C
2. Primary Memory:
• Primary memory holds only those data and instructions on which the computer is currently
working.
• It has a limited capacity and data is lost when power is switched off.
• It is generally made up of semiconductor devices.
• These memories are not as fast as registers.
• The data and instruction required to be processed reside in the main memory.
• It is divided into two subcategories RAM and ROM.

31
Introduction to Programming
and C
3. Secondary Memory:
• This type of memory is also known as external memory or non-volatile. It is slower than the
main memory.
• These are used for storing data/information permanently.
• CPU directly does not access these memories, instead, they are accessed via input-output
routines.
• The contents of secondary memories are first transferred to the main memory, and then the
CPU can access it.
Examples- disk, CD-ROM, DVD, etc.

32
Introduction to Programming
and C
Introduction to computer-based problem solving
Introduction: In the early 1970s, Dennis Ritchie developed C programming language at AT&T Bell
Laboratories. Even before being published, the language started gaining popularity and support in its
revolutionary phase. Because of its enormous success, very soon there was a need to standardise the
definition of C language. In 1983, a committee was established by the American National Standards
Institute, known as ANSI C Committee, to standardize the C programming language.

C is a general purpose, structured programming language. There is a big debate in considering whether
C is a high-level programming language or a low-level programming language. In reality, it provides
capabilities that help the user to interact with machine level which is much lower level of the computer.
It has been nearly connected with the UNIX system where it was developed subsequent to both the
system and the greater part of the projects that keep running on it are developed in C.
33
Introduction to Programming
and C
Problem Identification and Definition
• In the case of computer based system it may be related to either software or hardware which
may affect the user requirements of system administrators, managers or simple users.
• In such cases, problem identification indicates the understanding of information needs of
various users. So any gap in understanding of information needs indicates failure in future.
• While identifying problem definition, you should also keep in mind about user’s level of
understanding. Based on that, users can be of two groups: one, who are totally unaware of
advantages of immediate access to information through computers and two who are well
aware of the advantages of computers.

34
Introduction to Programming
and C
Problem Identification and Definition (Contd….)
• This is the first and important step to determine the information needs.
• Problem can be identified by taking the existing system as reference.
• A question and answer session also can help in problem identification.
• Expected information needs can be stated or users also can interpret in suggesting
information needs to define a problem.
• Simply a problem is nothing but a crisis.

35
Introduction to Programming
and C

There are some other concerns which may create problem while identifying
information needs:
• Speed of Processing: It indicates the time required for processing any transaction. As you
know, for some system it is very crucial to get the response in fraction of a second. For
example, railway reservation system, online payment, etc.

• Volume of Work: To avoid any kind of hazards, the volume of information to be handled at
each transaction should be calculated.

• Reliability: Design should be robust enough to provide reliability. In case of any


breakdown, alternative computing facility should be available.

36
Introduction to Programming
and C

There are some other concerns which may create problem while identifying
information needs:
• Accuracy: To provide accuracy, the machine should process data precisely.

• Security: It is the major concern of any computer based problem. Confidentiality, privacy

and security of data should be provided to make a successful solution for any computer

based problem.

• Cost: It indicates the operational and developmental cost of data processing system. It

includes manpower, hardware, software, consumables and supplies and overhead costs.

37
Introduction to Programming
and C
Algorithm and Flowchart for Problem Solving
• As we all know, computer is just like a black box. It can neither think nor make decisions
by its own. Only by human instructions computer can solve the problem.

• These instructions are ordered in such a way that the computer can solve the problem by
following them and this sequence is called an algorithm.

• Algorithms are self-contained set of operations to be performed step by step.


In reality, algorithms have been generated from the concept of mathematics. In
mathematics, we follow certain rules and maintain a sequence to solve any problems.

• Similarly, an algorithm also consists of some rules and follows a sequence to solve the
problem. An algorithm can be defined for any kind of a problem (e.g. Mathematical,
38
scientific or business-oriented problems).
Introduction to Programming
and C
An algorithm has a few properties as discussed below:
Finiteness: In an algorithm, a number of steps should be finite, that is, after any mechanical
execution it should stop automatically.

Definiteness: An algorithm should be simple and unambiguous so that the computer can
interpret it easily.

Generality: Algorithm should be designed in such a way that it can solve all the problems of a
similar kind.

39
Introduction to Programming
and C
An algorithm has a few properties as discussed below:
Effectiveness: An algorithm should be effective so that it can give a unique solution to the
problem it is designed for.

Input-output: Each algorithm works with some input or initial data to generate some outputs.
So, algorithms should be careful about run-time problems (especially mathematical problems)
which may arise unexpectedly.

40
Introduction to Programming
and C
Following is an example of the concept of an algorithm.
Example: How to make cup of tea?

Step 1: Switch on the electric heater.

Step 2: Place a kettle on the heater.

Step 3: Let the water boil in the kettle.

Step 4: Add milk, sugar and tea bags.

Step 5: Remove the tea bag and serve the tea.

From the above-mentioned example, we can see how a step-by-step approach can give a
solution for a particular problem.
41
Introduction to Programming
and C
Classification of Algorithms:
According to the various factors , algorithm is divided into various categories:

1.Deterministic, Non-Deterministic and Random Algorithm


•In an algorithm, if the control logic encounters a decision box with two routes for yes and for no
after execution of each steps, then it is known as deterministic algorithm.For example, factorial of
any number.
•If the algorithm is capable of exploring a large number of alternatives simultaneously to reach out
to a correct solution, then it is known as non- deterministic algorithm. For example, searching the
maxima of a function.
•If after executing some steps, the control logic shifts to another step of the algorithm as dictated by
a random device, then it is known as random algorithm, for example, random search.
42
Introduction to Programming
and C
Classification of Algorithms (Contd…)
2. Direct and Indirect Algorithm

• The number of repetition is known in advance algorithm, for example, arranging a number in
decreasing or increasing order.
• Repetitive steps are executed a number of times, but the number not being known
beforehand, for example, prime number check.

3. Infinite Algorithm

• In some problems, the longer the algorithm continues, the better the estimate of the results. In
such cases, the programmer must have a measure of discrepancy or error of any particular
estimate. The algorithm based on such kind of estimation is known as infinite algorithm, for
43
example, any iterative method.
Introduction to Programming
and C
Classification of Algorithms (Contd…)
Let us discuss the three basic components of algorithm development to control the flow of
information processing. They are sequential flow, conditional flow and repetitive flow.
Sequential flow: As the name suggests, all the steps are organised in a predefined sequence.
For example, student fees calculation. Suppose admission fee per student is A, per semester fee
is S, total number of semesters in a program is T, total semester cost of the program C, and total
cost V for a program to be calculated and printed on a leaflet, and then the algorithm will be as
follows:

INPUT A, S, E, T C = S*T

V= A+C
44
Print Leaflet
Introduction to Programming
and C
Classification of Algorithms (Contd…)
Conditional flow: If in an algorithm, a decision is made based on a condition, then that
algorithmic flow is known as conditional flow, for example, a student’s result system. If a
student scores more than 40%, then print pass or print fail.

INPUT P If P> 40%

Then Print “Pass”

Or else

Print “Fail”

Repetitive flow: It indicates the repetition of flow. If the condition will be true, the same steps
will be followed. 45
Introduction to Programming
and C
Flowchart
Algorithm is a step-by-step sequence of
instructions to solve a problem. Similarly,
flowchart is a pictorial representation of the
problem-solving sequence. Alternatively, it
can be defined as the graphical representation
of an algorithm. It acts like a ready roadmap
for a programmer and guides from the starting
point to the final outcome of the program.
Flowchart includes a finite number of symbols
and instructions, which are connected to each
46
other by an arrow mark.
Introduction to Programming
and C
Flowchart (Contd..)
Let us see the algorithm of tea preparation
using the flowchart:

47
Introduction to Programming
and C
Programming and Implementation Issues
By now, you would have learnt how to solve a computational problem using sequential or
computation steps. But how you will instruct the steps to the computer? The programming language
will do that. Programming language converts each sequence of computational steps into
understandable notations to the computer. This notation with any specific programming language is
known as a program. Developing that program is known as programming and the developer is called
a programmer.

1. System Design Technique

In algorithm development, we have seen different approaches for information processing; but to
solve a problem, its solution must be specified in terms of a sequence of computational steps. It is
known as the system design. Following are the two types of system designs that became popular: 48
Introduction to Programming
and C
Programming and Implementation Issues (Contd…)
Top-Down Design: This approach is adopted when you find it difficult to manage a big
problem. In such cases, the big problem is divided into a number of smaller and simpler
problems which can be handled easily. It works as follows:

1.The main program is written first and tested before the sub-programs are written.
2.Stubs are created to replace the actual sub-program and see the data flow.
3.Each module is written and tested.
4.A simple main program is written to test the sub-program.
5.If run successfully, then sub-programs are tested with the main program.
6.If the whole program will run successfully, then write and recheck.

49
Introduction to Programming
and C
Programming and Implementation Issues (Contd…)
Top-Down design advantages:

•Easy to discover the error in each module.


•Easy to debug.
•Small modules are desirable, maximum 100 lines long.

50
Introduction to Programming
and C
Programming and Implementation Issues (Contd…)
Bottom-Up Design: In C programming, bottom-up design involves starting with the implementation
of lower level modules and gradually building up to the complete program. This approach ensures that
each module is tested and validated before integrating it into the larger system.

Here are the steps involved in implementing a bottom-up design approach in C programming:
1.Identify the problem: Start by identifying the problem that needs to be solved.
2.Decompose the problem: Break down the problem into smaller, more manageable sub-problems.
3.Implement the sub-problems: Implement the sub-problems as independent modules.
4.Test the sub-problems: Test each sub-problem to ensure that it functions correctly.
5.Integrate the sub-problems: Combine the sub-problems to create the complete solution.
6.Test the integrated system: Test the integrated system to ensure that it meets the requirements. 51
Introduction to Programming
and C
Programming and Implementation Issues (Contd…)
Here is an example of how to implement bottom-up design in C programming:
Suppose you want to write a program that reads in an integer from the user and outputs its factorial.
You can use bottom-up design to break down this problem into smaller sub-problems:
1.Implement the input function: Implement a function that reads an integer from the user.
2.Implement the factorial function: Implement a function that calculates the factorial of an integer.
3.Implement the output function: Implement a function that outputs the result of the factorial
calculation to the user.
4.Test the sub-problems: Test each function to ensure that it works correctly.
Bottom-Up design Advantages:
Bottom-Up design is in making decisions at very low level and to decide the reusability of
52
components
Introduction to Programming
and C
Programming and Implementation Issues (Contd…)
2. Programming Techniques
There are two techniques for programming: Linear programming and Structured programming.
Linear programming is similar to sequential programming. It is a straightforward way of
programming and does not have any decision making.

Example of linear programming:

Step 1: Input values for P and Q Read data value

Step 2: Add Q to P and store in ADD Compute result and use that if necessary to
compute desired answer
Step 3: Display the value of ADD Print the answer

Step 4: End Stop


53
Introduction to Programming
and C
Programming and Implementation Issues (Contd…)
Structured programming includes conditional flow. In terms of complex program, branching
and looping are very important to write the algorithm. Branching is possible by decision
making.
Structured programming is used to write less error prone complex programs which are easy to
debug. In this technique, the whole program is broken into separate pieces of modules. Each
module, in turn, is broken down into smaller pieces, which can also be further subdivided.
Modules must be chosen such that you can specify how they are to interact.

54
Introduction to Programming
and C
Programming and Implementation Issues (Contd…)
For example,
#include<stdio.h>
main()
{
int a, b, c;
printf(“enter two numbers for a and b”);
scanf(“%d,%d”,&a,&b);
c= a+b;
printf(“The of two numbers %d and %d is %d”, a, b, c);
getch();
55
}
Introduction to Programming
and C
Advantages of Structured Programming:
• The heart of efficient programming is problem decomposition. It breaks the big problem
into small tasks. With structured programming, program can be written more easily and
quickly.
• Errors can be found easily, and hence, it takes less time to debug.
• Easily maintainable.
• For application program development, productivity becomes high with structured
programming.

56
Introduction to Programming
and C
Basic Constructs of Structured Programming
In structured programming, three constructs are available: sequence, selection and repetition.

Sequence: It is a continuous set of actions where one is followed by another till the expected
result is obtained.

The structure of sequence constructs is given below:

Statement 1

Statement 2

Statement 3

- - - - - - - - - -Statement n
57
Introduction to Programming
and C
Basic Constructs of Structured Programming (Contd…)
Selection: It is used in conditional execution. When you take some action based on the results of
logical test done by you, then that will be considered as selection constructs. The structure of
selection constructs is illustrated below:

If (condition is true) Sequence of statement

Else

Another sequence of statement

Endif

58
Introduction to Programming
and C
Basic Constructs of Structured Programming (Contd…)
Iteration: Iteration is a repetitive execution of consecutive instructions. It is also called looping.
It may either be conditional looping or unconditional looping. Conditional looping is executed
until some logical condition has been satisfied, but in unconditional looping, the instructions are
repeated for a specified number of times.

Modular Designs of Program


As we have seen, modular design is highly accepted in program development, each program
may consist of various modules as part of a program and each module performs separate
functions. Logically, a program can be divided into the following functional modules:

59
Introduction to Programming
and C
Modular Designs of Program (Contd..)
• Initialisation

• Input

• Input data validation

• Processing

• Output

• Error handling

• Closing procedure

60
Introduction to Programming
and C
Modular Designs of Program (Contd..)
• Similarly, a module also consists of five basic attributes: input, output, function, mechanism
and internal data. In case of any computer program, a logical flow should exist. Logical
flow indicates the interrelationships of modules and arrows are used to arrange the modules
at different levels. Arrows also indicate program control in passing from one module to
another at the time of execution.

• Similar to control passing information, data information is also passed between two
modules. An arrow with an empty circle at its tail indicates data information passing.
Similarly, a filled-in circle at the end of the tail of an arrow indicates control passing.
Modular design is also familiar as hierarchical design.

61
Introduction to Programming
and C
Modular Designs of Program (Contd…)
To make modular design advantageous, the following requirements should be fulfilled:

•Coupling: It means how modules are strongly related to each other so that if you do change in
one module it will not much affect other modules. It means coupling should be minimised.
•Cohesion: It indicates the strength of relations within the module. For an ideal design, cohesion
should be maximised.

62
Introduction to Programming
and C
Modular Designs of Program (Contd…)
• Span of Control: An individual module may call a fixed number of subordinate modules.
That number is called Span of Control which may vary from 5 to 7.
• Size: Always the module size should be small. So the number of instructions within a
module is also limited.
• Shared use: For modular design, each module within that program is accessible by other
modules. You should not use duplicate function for separated modules, but you can invoke a
function from one module to any other module if required.

63
Introduction to Programming
and C
Top-down Design and Step-wise Refinement
• Till now, we have learnt various methods to solve a problem using the computer-oriented
programming method.

• It is clear that from problem identification to execution, data is the main entity used
throughout in the process. To solve a problem, algorithm is a step-by-step finite sequence of
instructions. It may be designed based on the top-down approach or bottom up approach.

• As we have seen in the top-down algorithm design, a hierarchy of modules is used. We


break the problem or specification into simpler and simpler pieces, and control is passed
downward to the structure.
• Each piece or module or method serves a specific function. We break the problem or
specification into simpler and simpler pieces, and control is passed downward to the
structure. Each piece or module or method serves a specific function. 64
Introduction to Programming
and C
Top-down Design and Step-wise Refinement (Contd…)

65
Introduction to Programming
and C
Top-down Design and Step-wise Refinement (Contd…)
• As we can see above, a module can be subdivided until it contains a single elementary
process. This approach of algorithm design gives a detailed specification of functions. But
when we convert the algorithm into a program, then a few steps of refinements are required.

• If we are extremely familiar with the problem and are able to easily convert the problem
into a mathematical model, then initially we can design an informal algorithm for that
particular problem. That algorithm may contain general statements or we can name them as
informal instructions. Then that algorithm will be converted to a formal algorithm with
definite instructions. In some cases, specific programming language syntax and semantics
may also be used. Finally, the program is developed based on the formal algorithm using
specified programming language.
66
Introduction to Programming
and C
Top-down Design and Step-wise Refinement (Contd…)
This whole stepwise refinement process is illustrated in the following figure

As discussed above, the following steps need to be followed to write a program for a given
problem:

First stage is informal representation of the problem. In this stage, we represent the problem
using any mathematical model, (e.g. tree graph) will be discussed later in the following chapters.
This is the main or formal algorithm design stage. In this stage, we convert our informal
algorithm into a formal algorithm, which may include the syntax and semantic of predefined
programming language.
This is the program implementation phase where we define the abstract data types and write the
procedures for the various operations using a prescribed programing language. 67
Introduction to Programming
and C
Top-down Design and Step-wise Refinement (Contd..)

68
Introduction to Programming
and C
Programming environment
• Without a proper programming environment, programming is not possible. Programming
environment includes hardware support, software setup, network connectivity and web
browser.

• As you already know, to solve any problem using programming, the first step is to design an
algorithm. Then, based on the algorithm, the developers develop the program using the
prescribed programming language.

• So for the development of a program, the programming environment should provide their
basic setups to developer. Firstly, a text editor to write the program, a compiler to convert
that program into the machine language and finally an interpreter to execute the program.
69
Introduction to Programming
and C
Programming environment
• Programming environment varies from language to language. Basically, programming
languages are of two types: low-level and high-level languages. In the following sections ,
we learn about the types of programming languages

70
Introduction to Programming
and C
Programming Languages
Programming language consists of a set of commands which is understood by computer. On the
basis of development, programming languages are categorised as shown in the below figure:

71
Introduction to Programming
and C
Image Source: Taken it from SLM of iNurture
According to the above figure of hierarchy, the first level shows the basic categories of
programming languages, which include low-level and high-level programming languages. The
main difference between these two is their level of abstraction. Compared to low-level
languages, high-level programming languages are more abstract. Instructions written in low
level language implement short and targeted operations. Let us discuss each type of
programming language in detail.

72
Introduction to Programming
and C
Programming Languages(Contd…)
First Generation or Machine Language
Machine language is the oldest and most basic of all the languages. This is the reason it is
known as the first generation language. In this language, all the instructions are provided to the
computer in a binary format which accepts only ‘0’ and ‘1’. Computer instructions generated in
the machine language consist of two parts: opcode and operand. Opcode specifies the operations
to be performed, and operands indicate the location of data which are going to be manipulated.

73
Introduction to Programming
and C
Programming Languages (Contd…)
The figure shows the instructions format of machine language.
The above given instruction format may vary based on the computer CPU architecture. To write
a program in machine-level language, you have to remember the binary codes which are really
very tedious job for human beings.

74
Introduction to Programming
and C
Programming Languages (Contd…)
Second Generation or Assembly Language:
Although it is called as second generation language, in reality, it acts as the foundation for the
third generation language. Small English words called mnemonics are used to replace the binary
code (opcodes) of the machine language. An assembler converts the instructions written in
second generation language into machine language
For example:
MOV X,Y;
Mnemonics ‘MOV’ is used to represent move or transfer operation and to specify the register
location, where the data is located, X, Yare used.
Basic code with mnemonics is called a source code, and after conversion into machine language
75
it is known as the object program.
Introduction to Programming
and C
Programming Languages (Contd…)
Third Generation or Procedural Language
It is the refined version of assembly level language and falls under the high-level language. It is
a procedure-oriented language in which a programming task is broken into a collection of
variables, data structures and functions known as procedures. Each procedure consists of a series
of steps for computing. These programs written in high-level language, that is, English
statements, cannot be executed directly, and hence, translators such as compilers and interpreters
are used to convert them into machine language. A few examples of third generation language
are C, C++, JAVA and BASIC.

76
Introduction to Programming
and C
Programming Languages (Contd…)
Fourth Generation Language(4GL)
Compared to the low-level language, it is easy to write a code in the high-level language. 4GLs
are more focused on what is to be accomplished rather than how it is to be accomplished. It
includes interactive coding in the form of an onscreen menu selection to formulate an enquiry. It
is programmer friendly and enhances programming efficiency with usage of English words. It
uses graphical tools and provides a visual environment to work. So lot of training is not required
to work with 4GL. To facilitate programming speed and increased productivity, high memory is
needed. Mostly the database management packages such as dBase, Foxbase , Foxpro, Oracle
and spreadsheet packages such as Lotus-123, MS-Excel fall under the 4th generation language.
The most popular example of 4GLs are Visual Basics(VB) and Structured Query
77
Language(SQL).
Introduction to Programming
and C
Programming Languages (Contd…)
Fifth generation or Visual or Graphic Language
While programming with the fifth generation language, a programmer prefers to solve problems
based on the constraints provided with the program rather than using an algorithm to develop the
program. Applications of fifth generation algorithms are mainly found in artificial intelligence
research. PROLOG(programming logic), OPS5 and mercury are examples of fifth generation
language.

78
Introduction to Programming
and C
Programming Environment
Assembler: As you know, assembler works as a translator for the assembly level language. It
translates source code of assembly language program into machine language which is known as
the object program. After creation of object program, it is transferred into the computer’s
primary memory using the system loader. Then a linker program is used to convert the object
program into an executable program. Finally, execution starts and proceeds till the end of the
program.

79
Introduction to Programming
and C
Programming Environment (Contd…)
There are two types of assemblers

•One pass assembler


•Two pass assembler

One pass assembler is load and go assembler. It generates the object code immediately for
execution. No object program is written out and no loader is needed. It is useful in a system-
oriented program development and testing. The following figure shows how one pass assembler
80
works.
Introduction to Programming
and C
Programming Environment (Contd…)

Two pass assembler


Two pass assembler has two stages:
1. Pass one
• It assigns addresses to all statements in source code
• Save addresses assigned to labels for use in pass two
• Process directives

81
Introduction to Programming
and C
Programming Environment (Contd…)
2. Pass two
• Translate instructions
• Convert label to address
• Generate values defined by BYTE and WORD
• Process the directives not done in pass one
• Write object code to output device

82
Introduction to Programming
and C
Programming Environment (Contd…)

83
Introduction to Programming
and C
Programming Environment (Contd…)
Compilers: We know that computers only understand machine language (that is, binary codes).
So when you write a program in high level language, before executing, it should be translated
into a machine language. A software program performs this function. In the case of high-level
language, that program is called as a compiler. The translating software is called a compiler as it
compiles a set of machine language instructions. In high-level language, compilers convert the
source code into object code.

84
Introduction to Programming
and C
Topic ( Times New Roman Bold-24pt)
Text (Times New Roman-20pt- Line spacing 1.5pt)

85
Introduction to Programming
and C
Programming Environment (Contd…)
Every language has its own assembler, and it can translate only those programs which are
written in that particular language, as illustrated in the figure below.

Separate compilers for separate languages


86
Introduction to Programming
and C
Programming Environment (Contd…)
Compilers are large programs and are permanently stored on the secondary storage. When a
program is to be compiled, the compiler is copied onto the main memory and executed through
the CPU. At the time of compilation, the compiler analyses each instruction (statement) of the
source program (written in high-level language) and generates the object code or sequence of
machine instructions. It also detects various errors related to syntax (grammar) and semantics
(meanings). A compiler can detect the following errors:
a.Illegal characters
b.Illegal combination of characters
c.Improper sequencing of instructions in a program

87
Introduction to Programming
and C
Programming Environment (Contd…)
If a compiler detects errors in the source program, then translation does not occur from the
source program to the object code and the errors get listed. Once the errors are fixed, the
program has to be recompiled to create the object program. One major drawback of the compiler
is, it cannot detect the logical errors of the program. Only after execution of the program and
when the result is obtained the logical errors can be identified.

88
Introduction to Programming
and C
Programming Environment (Contd…)
Interpreters: Similar to assembler and compiler, interpreter works as a translator for converting
high-level language into machine level language. The only difference is, it translates only one
statement or instruction at a time. Immediately after translation, the statement is executed. The
object code generated by the interpreter is saved permanently for future use and is saved every
time the program is to be executed. Hence, you need not compile the program every time it is
executed. Nevertheless, if the object program is not saved by the interpreter, then the interpreter
will have to execute the statement again.

89
Introduction to Programming
and C
Programming Environment (Contd…)
Advantages of interpreter over compiler:
•It quickly translates the source program into object program.
•Interpreters are easy to write and simpler programs compared to compilers.
•It does not require large memory space.

Disadvantages:
•It is time consuming because it translates each statement in the source program line by line.

90
Introduction to Programming
and C
Introduction to C

The above diagram clearly demonstrates that C language has successfully survived for more than three
decades, whereas everyday various languages, tools, technologies emerge and vanish in different
91
industries. Below listed are a few features that make C language a vastly used programming software.
Introduction to Programming
and C
Introduction to C (Contd…)
• C is characterised by the ability to write very concise source programs, due in part to the
large number of operators included within the language. It is machine independent and a
highly portable language.
• It has only 32 keywords or instruction set, although actual implementations include
extensive library functions which enhance the basic instructions. Even a user or a
programmer can write their own library functions which will increase the features and
capabilities of the language.
• C language gives the provision for manipulating bits, bytes and addresses (low-level
activities).

92
Introduction to Programming
and C
Introduction to C (Contd…)
• It has a large library of inbuilt functions.
• A programmer can write several building blocks known as functions within a single program.
Each function performs individual tasks according to the requirement of the program.
• C compiler is easily available for all sizes of computers. Compilers are usually compact and
generate object programs that are small and highly efficient when compared to programs
compiled another high-level languages.
• It supports pointer implementation.

93
Introduction to Programming
and C
Structure of a C program
Writing a program is the best way to learn programming language. Let us start with the structure of
general C program
Documentation section /*Program to calculate ch = ‘a’; printf(“func =
the power of %d\n”, func(i));
any decimal(integer) printf(“ch = %c\n”,
value */ ch);
}
Link section #include<stdio.h>
Definition section #define MAX 1000
Global declaration section int g =100; User defined functions /
main() function section main() Subprogram section intfunc(int x)
{ { Function 1 {
Declaration part Executable inti; char ch; Function 2 return x*x;
part i= 5*MAX’; . }
} Function n
94
Introduction to Programming
and C
Structure of a C program (Contd…)
• According to the above examples, C program starts with the documentation section. The section is
used to include comments (remarks) regarding the name of the program, the author and other details
which the programmer would like to use later. Comments may appear anywhere within a program as
long as they are placed within the delimiters /* and */ (for example, /*this is a comment*/). Such
comments are helpful in identifying the program’s principal features or in explaining the underlying
logic of various program features.
• The next section is the link section, which provides instructions to the compiler to link functions from
the system library. #include is a preprocessor directive. It includes the information required to execute
specific functions from the mentioned header file during compilation. The <stdio.h> header file,
which consists most of the C input/output functions, has been used in the reference program.
95
Introduction to Programming
and C
Structure of a C program (Contd…)
• All symbolic constants are defined by the definition section. For example, the value of
MAX variable is 1000 throughout the program.
• Global declaration includes the information about global variables. When a variable is
declared in one function and can be used in several functions, then that variable is called a
global variable.
• Every C program must have one and only main function. Every C program starts execution
from main( ). According to C program syntax, main( ) should be written in lowercase and
should not be terminated with a semicolon. The responsibility of main function is to call
other functions and also user defined functions.

96
Introduction to Programming
and C
Structure of a C program(Contd…)
• As we can see above, the main function definition has to be written inside a pair of curly
braces { }. You can also say these braces are the indication of start and end of functions and
compound statements. Function body consists of two parts: declaration part and executable
part. Declaration part includes all variables including array and user defined functions and
executable part consists of the main instructions to perform any specific task. Remember,
the statement of executable part has to be terminated by a semicolon.

97
Introduction to Programming
and C
Preprocessor directives
Preprocessor directives in C are instructions that are processed by the preprocessor before the
code is compiled. These directives are lines of code that begin with a hash symbol (#).
Some common preprocessor directives in C include:
•#include - This directive is used to include header files in the C program. Header files contain
declarations for functions, variables, and other symbols that are used in the program.
•#define - This directive is used to define constants, macros, and inline functions. Constants are
values that do not change during the program's execution. Macros are shorthand for longer code
sequences. Inline functions are functions that are expanded inline at the point of their call, which
can improve performance in some cases.

98
Introduction to Programming
and C
Pre-processor directives (Contd….)
• #ifdef, #ifndef, #else, and #endif - These directives are used for conditional compilation.
They allow parts of the code to be compiled or skipped based on whether a particular
condition is met. #ifdef tests whether a macro is defined, while #ifndef tests whether it is not
defined. #else is used to specify an alternate block of code to be compiled if the condition is
not met, and #endif is used to mark the end of the conditional block.

99
Introduction to Programming
and C
Compiling and executing C programs
• The compilation is a process of converting the source code into object code. It is done with
the help of the compiler.
• The compiler checks the source code for the syntactical or structural errors, and if the
source code is error-free, then it generates the object code.
• The C compilation process converts the source code taken as input into the object code or
machine code.

100
Introduction to Programming
and C
Compiling and executing C programs (Contd…).
• The compilation process can be divided into four steps: Preprocessing, Compiling,
Assembling and Linking.
• The preprocessor takes the source code as an input, and it removes all the comments from
the source code. The preprocessor takes the preprocessor directive and interprets it.
• For example, if <stdio.h>, the directive is available in the program, then the preprocessor
interprets the directive and replace this directive with the content of the 'stdio.h' file.

101
Introduction to Programming
and C
Compiling and executing C programs (Contd…)
The following are the phases through which our program passes before being transformed into
an executable form:
•Pre processor
•Compiler
•Assembler
•Linker

102
Introduction to Programming
and C
Compiling and executing C programs (Contd…)
Preprocessor
The source code is the code which is written in a text editor and the source code file is given an
extension ".c". This source code is first passed to the pre processor, and then the pre processor
expands this code. After expanding the code, the expanded code is passed to the compiler.
Compiler
The code which is expanded by the preprocessor is passed to the compiler. The compiler
converts this code into assembly code. Or we can say that the C compiler converts the pre-
processed code into assembly code.

103
Introduction to Programming
and C
Compiling and executing C programs (Contd…)
Assembler
The assembly code is converted into object code by using an assembler. The name of the object
file generated by the assembler is the same as the source file. The extension of the object file in
DOS is '.obj,' and in UNIX, the extension is 'o'. If the name of the source file is 'hello.c', then
the name of the object file would be 'hello.obj'.

104
Introduction to Programming
and C
Compiling and executing C programs (Contd…)
Linker
•All the programs written in C use library functions. These library functions are pre-compiled,
and the object code of these library files is stored with '.lib' (or '.a') extension. The main working
of the linker is to combine the object code of library files with the object code of our program.
Sometimes the situation arises when our program refers to the functions defined in other files;
then linker plays a very important role in this. It links the object code of these files to our
program.

105
Introduction to Programming
and C
Compiling and executing C programs (Contd…)
• Therefore, we conclude that the job of the linker is to link the object code of our program
with the object code of the library files and other files. The output of the linker is the
executable file. The name of the executable file is the same as the source file but differs only
in their extensions. In DOS, the extension of the executable file is '.exe', and in UNIX, the
executable file can be named as 'a.out'. For example, if we are using printf() function in a
program, then the linker adds its associated code in an output file.

106
Introduction to Programming
and C
Compiling and executing C programs(Contd…)
Let us understand through an example.
hello.c
#include <stdio.h>
int main()
{
printf("Hello");
return 0;
}

107
Introduction to Programming
and C
Compiling and executing C programs (Contd…)
The following steps are taken to execute a program
•Firstly, the input file, that is, hello.c, is passed to the preprocessor, and the preprocessor
converts the source code into expanded source code. The extension of the expanded source code
would be hello.i.
•The expanded source code is passed to the compiler, and the compiler converts this expanded
source code into assembly code. The extension of the assembly code would be hello.s.
•This assembly code is then sent to the assembler, which converts the assembly code into object
code.
•After the creation of an object code, the linker creates the executable file. The loader will then
load the executable file for the execution.
108
Introduction to Programming
and C
Summary
• C is a general purpose, structured programming language.
• Algorithms are self-contained set of operations to be performed step by step. Its basic
properties are: finiteness, definiteness, generality, effectiveness, and input-output
• In algorithm development, three components are very important to control the flow of
information processing. They are sequential flow, conditional flow and repetitive flow.
• In sequential flow, the steps are organised in a predefined sequence. In conditional flow,
decision is made based on a condition and in repetitive flow, as the name suggests, if the
condition will be true, the same steps will be repeated.

109
Introduction to Programming
and C
Summary (Contd…)
• Programming language consists of a set of commands which is understood by computers.
Basically, programming languages are two types: low level and high level languages
• Computer instructions generated in machine language consist of two parts: opcode and
operand. Opcode specifies the operations to be performed and operands indicate the location
of data which are going to be manipulated.
• Reusability is the important feature of function. Every program has a main( ) function.
Program execution will always begin by carrying out the instructions in main.

110
Introduction to Programming
and C
Self Assessment Question
1. ______ of data should be provided to make a successful solution for any computer-based problem.

a. Confidentiality

b. Privacy

c. Security

d. a, b and c

Answer: d

111
Introduction to Programming
and C
Self Assessment Question
2. In algorithm, the number of steps should be________, so that after any mechanical
execution, it should stop automatically.

a. Finite

b. Definite

c. General

d. Effective

Answer: a

112
Introduction to Programming
and C
Self Assessment Question
3. ____________ converts each sequence of computational steps into understandable
notations to the computer.

a. Flowchart

b. Algorithm

c. Programing Language

d. Programmer

Answer: c

113
Introduction to Programming
and C
Self Assessment Question
4. In_________design, the big problem is divided into a number of smaller and simpler
problems which can be handled easily.

a. Top-down

b. Bottom-up

c. Sequential

d. Flowchart

Answer: a

114
Introduction to Programming
and C
Self Assessment Question
5. _______is repetitive execution of consecutive instructions, which is also known as looping.

a. Selection

b. Development

c. Sequence

d. Iteration

Answer: d

115
Introduction to Programming
and C
Self Assessment Question
6. What is C programming?

a. A high-level programming language

b. A low-level programming language

c. A markup language

d. A scripting language

Answer: b

116
Introduction to Programming
and C
Self Assessment Question
7. Which of the following is the correct syntax for a single-line comment in C?

a. // This is a comment

b. /* This is a comment */

c. # This is a comment

d. "This is a comment"

Answer: a

117
Introduction to Programming
and C
Self Assessment Question
8. What is the correct way to declare an integer variable named "age" in C?

a. var age;

b. int age;

c. age = int;

d. int = age;

Answer: b

118
Introduction to Programming
and C
Self Assessment Question
9. What is the output of the following C code?
#include <stdio.h>
int main() {
int num1 = 5;
a. Result: 2.500000
int num2 = 2;
b. Result: 2
float result = num1 / num2;
printf("Result: %f", result); c. Result: 2.0

return 0; d. Compilation error

}
Answer: b
119
Introduction to Programming
and C
Self Assessment Question
10. What is the purpose of the ‘return’ statement in a C program?

a. It indicates the end of the program

b. It returns a value to the calling function

c. It prints the output on the screen

d. It defines a function

Answer: b

120
Introduction to Programming
and C
Assignment
1. Explain the differences between a compiler and an interpreter in programming.
2. Draw a flowchart for a program that calculates the area of a rectangle.
3. Explain the difference between top-down design and stepwise refinement in the context of
software development.
4. What are the advantages of using a high-level programming language like C instead of a
low-level language like assembly language?
5. Describe the role of the preprocessor in a C program. Provide an example of a preprocessor
directive and explain its purpose.
6. Explain the difference between source code and object code in the context of C
programming.
121
Introduction to Programming
and C
Assignment
7. Describe the steps involved in compiling and executing a C program.
8. What is the purpose of a header file in C programming? Provide an example of a standard C
header file.
9. Describe the difference between text files and binary files in the context of input and output
in C programming.
10. Write a C program that reads input from a user and writes output to a file.
11. Explain the difference between an assembler, a compiler and an interpreter in the context of
programming.
12. Describe the basic structure of a C program, including the role of main() and any necessary
include statements.
122
Introduction to Programming
and C
Document Link

Topic URL Notes

This link contains C programming


All C basics https://pdfcoffee.com/qdownload/c-the-complete-refer
ence-4th-edpdf-pdf-free.html basics.

This link provides a basic guide for


C basics https://www.pdfdrive.com/c-programming-language-t
he-ultimate-beginners-guide-e158124142.html beginners.

123
Introduction to Programming
and C
Video Link

Topic URL Notes

This video talks about C programming


C fundamentals https://www.youtube.com/watch?v=KJgsSFOSQv0
for beginners.

Demonstration of first C This video demonstrates first C


https://www.youtube.com/watch?v=J-eV_1Dje9U
program Program

124
Introduction to Programming
and C
E- Book Link

Topic URL Notes

This link provides all the


Fundamentals of C https://www.pdfdrive.com/c-programming-the-ultimate
-way-to-learn-the-fundamentals-of-the-c-language-e1 fundamentals of C
87584209.html

More examples in C https://www.pdfdrive.com/c-programming-step-by-ste This link is helpful for beginners.


p-beginners-to-experts-edition-e188534879.html

125

You might also like