C programming Language

 



                  Program C

A computer program is a collection of instructions that can be executed by a computer to perform a specific task. A computer program is usually written by computer programmer in a programming language.

                            


Programming C language

A programming language is a formal language comprising a set of instructions that produce various kinds of output. Programming languages are used in computer programming to implement algorithms.


Types of Programming C Languages

There are two types of programming languages, which can be categorized into the following ways:

 1.       Low level language

a)      Machine language (1GL)

b)      Assembly language (2GL)

               2.       High level language

a)      Procedural-Oriented language (3GL)

b)      Problem-Oriented language (4GL)

c)       Natural language (5GL)


1. Low level language

This language is the most understandable language used

by computer to perform its operations. It can be further

categorized into:


a) Machine Language (1GL)

Machine language consists of strings of binary numbers

(i.e. 0s and 1s) and it is the only one language, the

processor directly understands. Machine language has an

Merits of very fast execution speed and efficient use of

primary memory.



Merits of Machine level Language:

⚫ It is directly understood by the processor so has faster

execution time since the programs written in this

language need not to be translated.

⚫ It doesn’t need larger memory.

Demerits of Machine level Language :

⚫ It is very difficult to program using 1GL since all the

instructions are to be represented by 0s and 1s.

⚫ Use of this language makes programming time

consuming.

⚫ It is difficult to find error and to debug.

⚫ It can be used by experts only.


b) Assembly Language

⚫ Assembly language is also known as low-level language

because to design a program programmer requires

detailed knowledge of hardware specification. This

language uses mnemonics code (symbolic operation

code like ‘ADD’ for addition) in place of 0s and 1s. The

program is converted into machine code by assembler.

The resulting program is referred to as an object code.


Merits of Assembly Language:

⚫ It makes programming easier than 1GL since it 

uses mnemonics code for programming. Eg: ADD for

 addition, SUB for

subtraction, DIV for division, etc.

⚫ It makes programming process faster.

⚫ Error can be identified much easily compared to 1GL.

⚫ It is easier to debug than machine language.

Demerits of Assembly Language :

⚫ Programs written in this language is not 

directly understandable

by computer so translators should be used.

⚫ It is hardware dependent language so programmers

 are forced to

think in terms of computer’s architecture rather than to the

problem being solved.

⚫ Being machine dependent language, programs written

 in this

language are very less or not portable.

⚫ Programmers must know its mnemonics codes to

 perform any task.



2. High level language

⚫ Instructions of this language closely resembles to

human language or English like words. It uses

mathematical notations to perform the task. The high

level language is easier to learn. It requires less time to

write and is easier to maintain the errors. The high

level language is converted into machine language by

one of the two different languages translator

programs; interpreter or compiler.


⚫ High level language can be further categorized as:

a) Procedural-Oriented language (3GL)

⚫ Procedural Programming is a methodology for

modeling the problem being solved, by determining

the steps and the order of those steps that must be

followed in order to reach a desired outcome or

specific program state. These languages are designed

to express the logic and the procedure of a problem to

be solved. It includes languages such as Pascal,

COBOL, C, FORTAN, etc.


Merits of Procedural-Oriented language :

⚫ Because of their flexibility, procedural languages are able to

solve a variety of problems.

⚫ Programmer does not need to think in term of computer

architecture which makes them focused on the problem.

⚫ Programs written in this language are portable.

Demerits of Procedural-Oriented language :

⚫ It is easier but needs higher processor and larger memory.

⚫ It needs to be translated therefore its execution time is

more.


b)Problem-Oriented language (4GL)

⚫ It allows the users to specify what the output should

be, without describing all the details of how the data

should be manipulated to produce the result. This is

one step ahead from 3GL. These are result oriented

and include database query language.

⚫ Eg: Visual Basic, C#, PHP, etc.

The objectives of 4GL are to:

⚫ Increase the speed of developing programs.

⚫ Minimize user’s effort to obtain information from

computer.

⚫ Reduce errors while writing programs.


Merits of Problem-Oriented language:

⚫ Programmer need not to think about the procedure of

the program. So, programming is much easier.

Demerits:

⚫ It is easier but needs higher processor and larger

memory.

⚫ It needs to be translated therefore its execution time is

more.



c) Natural language (5GL)

⚫ Natural language are still in developing stage where we could

write statements that would look like normal sentences.eg

Prolog, OPS5(Operations Support Systems) etc.

Merits of Natural language :

⚫ Easy to program.

⚫ Since, the program uses normal sentences, they are easy to

understand.

⚫ The programs designed using 5GL will have artificial intelligence

(AI).

⚫ The programs would be much more interactive and interesting.

Demerits:

⚫ It is slower than previous generation language as it should be

completely translated into binary code which is a tedious task.

⚫ Highly advanced and expensive electronic devices are required

to run programs developed in 5GL. Therefore, it is an

expensive approach.


Program design methodology:

⚫ Program design methodology refers to the

development of a system. The different Program

design methodology are given below:

⚫ Top Down Design

⚫ Bottom Up Design

⚫ Structured Design

⚫ Object Oriented Design




Software Development

⚫ Software development is the life cycle of processes that

is comprised of a well-segregated(separated) structure

imposed for the development of software that might

trend in the market.

⚫ The different software development stages are:

1. Gathering & Analysis of Requirement

2. Design

3. Coding/Implementation

4. Testing

5. Deployment Stage

6. Maintenance


1) Gathering & Analysis of Requirement:

⚫ Before the team of software technicians can give the

general idea for any software, it is essential for the team to

gather the business requirements in this very first phase. At

this point, the prime focus of the stakeholders and project

managers is to note the exact things needed from any

software under consideration. There are several questions

to be asked at this stage, which include:

⚫ Who is supposed to use this software?

⚫ How will the software be used upon completion?

⚫ What type of data should be added to the software?

⚫ What should be the data output by this software?

⚫ Once these general questions are answered, a general

outline is created for the software developers to focus on.

This data is then analyzed to ensure its validity & any

possibility for incorporation of the same.


1) Gathering & Analysis of Requirement:

⚫ Before the team of software technicians can give the

general idea for any software, it is essential for the team to

gather the business requirements in this very first phase. At

this point, the prime focus of the stakeholders and project

managers is to note the exact things needed from any

software under consideration. There are several questions

to be asked at this stage, which include:

⚫ Who is supposed to use this software?

⚫ How will the software be used upon completion?

⚫ What type of data should be added to the software?

⚫ What should be the data output by this software?

⚫ Once these general questions are answered, a general

outline is created for the software developers to focus on.

This data is then analyzed to ensure its validity & any

possibility for incorporation of the same.


2) Design:

⚫ Once the analysis is complete, the step of designing

takes over, which is basically building the architecture

of the project. The system designs help in specifying

the hardware as well as system requirements.

⚫ The design specifications for the system serve as the

input for the following phase of the software

development model.



3) Coding/Implementation:

After receiving the design documents for the software

to be created, the work following the design stage is

divided equally into various units and modules. This is

the stage where actual coding begins. The main focus

of the phase is the development of perfect codes by the

developers. This particular phase is the longest in the

entire protocol.



4) Testing:

⚫ Between coding and deployment, the software must go

through a series of tests. It’s imperative to remove any

bugs found in the code during testing. Coding

problems found after deployment are often a much

greater burden and make a poor impression on the

user. In this stage, integration testing, unit testing,

system testing, acceptance testing, are done.



5)Deployment Stage:

⚫ After all the errors from coding are removed during the

testing stage, the next step is termed as the deployment

stage. The finalized code is implemented into the software

and then deployed or delivered to the customers to be

used.

⚫ As the product is being given to potential customers, the

first thing done to ensure that it works fine on a large scale

is to go with beta testing. If there is any possibility for

changes or there are possible bugs caught during

implementation, it is immediately reported to the team.




6) Maintenance:

The SDLC is an ongoing process that does not end

after Deployment. Developers can monitor server load,

provide production support and develop new features

and updates based on user feedback. They will also

address any software issues that arise. From the

maintenance phase, a software update or new feature

will kick off the SDLC again. As such, it is important to

develop a good ongoing relationship between the

client and software development company.




Text editor:

⚫ It is a software that helps to write the code. C language

text editor are Turbo C, Dev C etc.



Compiler, interpreter, Assembler

⚫ Compiler is a translator which converts the whole high

level language program to machine language at a time.

⚫ Interpreter is a translator which converts high level

language program to machine language line by line

⚫ Assembler converts assembly language program to

machine language.



Algorithm:

⚫ Algorithm is a step-by-step instructions to solve the

problem.

Flowchart:

⚫ The graphical representation of Algorithm is called

flowchart.

Pseudo codes:

⚫ pseudocode is a plain language description of the

steps in an algorithm or another system. Pseudocode

often uses structural conventions of a

normal programming language, but is intended

for human reading rather than machine reading.






























































































































Post a Comment (0)
Previous Post Next Post