0% found this document useful (0 votes)
3 views

Document (1)

The document provides an overview of programming languages, defining programming as the process of writing code that instructs computers on how to perform tasks. It categorizes programming languages into machine language, assembly language, and high-level language, highlighting their differences and uses. Additionally, it compares C and C++ languages, detailing their history, features, and applications.

Uploaded by

maaz rao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Document (1)

The document provides an overview of programming languages, defining programming as the process of writing code that instructs computers on how to perform tasks. It categorizes programming languages into machine language, assembly language, and high-level language, highlighting their differences and uses. Additionally, it compares C and C++ languages, detailing their history, features, and applications.

Uploaded by

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

Name : MAAZ RAO

ROLL NO. :20-MM-47

SUB : COMPUTING FUNDAMENTAL

ASSIGMENT NO. #1

Q1) WHAT IS PROGRAMMING LANGUAGE ?

Ans: Computer programming is the process that professionals use to write


code that instructs how a computer, application or software program
performs. At its most basic, computer programming is a set of instructions
to facilitate specific actions. If you're wondering what a computer
programmer is, it's a professional that creates instructions for a computer
to execute by writing and testing code that enables applications and
software programs to operate successfully.

Computers can do amazing things, from basic laptops capable of simple


word processing and spreadsheet functions to incredibly complex
supercomputers completing millions of financial transactions a day and
controlling the infrastructure that makes modern life possible. But no
computer can do anything until a computer programmer tells it to behave in
specific ways. That’s what computer programming is all about.

At its most basic, computer programming is little more than a set of


instructions to facilitate specific actions. Based on the requirements or
purposes of these instructions, computer programming can be as simple as
adding two numbers. It can also be as complex as reading data from
temperature sensors to adjust a thermostat, sorting data to complete
intricate scheduling or critical reports or taking players through multi-layered
worlds and challenges in game.

PROGRAMMING IS EVERYWHERE :
Programming is, quite literally, all around us. From the take-out we
order, to the movies we stream, code enables everyday actions in our
lives. Tech companies are no longer recognizable as just software
companies — instead, they bring food to our door, help us get a taxi,
influence outcomes in presidential elections, or act as a personal
trainer.
Programming is, quite literally, all around us. From the take-out we
order, to the movies we stream, code enables everyday actions in our
lives. Tech companies are no longer recognizable as just software
companies — instead, they bring food to our door, help us get a taxi,
influence outcomes in presidential elections, or act as a personal
trainer.
WHAT IS PROGRAMMING?..
Put simply, programming is giving a set of instructions to a computer
to execute. If you’ve ever cooked using a recipe before, you can think
of yourself as the computer and the recipe’s author as a programmer.
The recipe author provides you with a set of instructions which you
read and then follow. The more complex the instructions, the more
complex the result!

Q2) HOW MANY TYPE OF COMPUTER PROGRAMMING ARE THEIR


?

ANS : Different Programming Languages

Nowadays, there are numerous programming languages are becoming more


general and all-purpose, but these languages have their specialties, and
each language has its own advantages and disadvantages. Usually,
programming languages can be classified into a few types, however, these
languages support multiple programming style. Every year there are a
number of programming languages are implemented, but few languages are
becoming very popular which may used by a professional programmer in
their career.

Programming languages are used to control the performance of the


computer or machine. At present, computer programmer has many choices
to choose the language, but there are many differences between
programming languages. So, this article gives a brief information regarding
what are the different types of programming languages, differences between
programming languages and types of programming languages in useful
ways.

The computer language is defined as code or syntax which is used to write


programs or any specific applications. The computer language is used to
communicate with computers. Broadly the computer language can be
classified into three categories assembly language, machine language, and
high-level language. The machine language is considered as oldest computer
language among all three. In machine language, the input is directly given as
binary input which is processed by the machine. Binary inputs mean one and
zero form. For computer language processing the system needs compiler
and interpreter to convert the language in computer language so that it can
be processed by a machine.

Different Types of Computer Language


1. Machine Language
2. Assembly Language
3. High-Level Language

1)MACHINE LANGUAGE:-

Machine code, also known as machine language, is the


elemental language of computers. It is read by the computer's central processing unit
(CPU), is composed of digital binary numbers and looks like a very long sequence of zeros
and ones. Ultimately, the source code of every human-readable programming
language must be translated to machine language by a compiler or an interpreter, because
code is the only language that computer hardware can understand.

The operating system defines how the program should write so that it can be
converted to machine language and the system takes appropriate action.
The computer programs and scripts can also be written in other
programming languages like C, C++, and JAVA. However, these languages
cannot be directly understood by a computer system so there is a need for a
program that can convert these computer programs to machine language.
The compiler is used to convert the programs to machine language which
can be easily understood by computer systems. The compiler generates the
binary file and executable file.

 Machine language is a programming language instruction that is


actually read and acted on by the computer processing circuitry.
Machine language is written in binary numbers and is virtually
impossible for humans to read; for this reason, programmers use
assembly language or a high-level programming language to write
programs, which are then compiled into machine language. Machine
language takes advantage of the unique characteristics of a given
processor, a compiled program written for one processor (or processor
family) will not execute on a different processor design. To develop
programs for more than one system, it is necessary to use compilers
that generate the code needed for each type of processor. See
assembly language, binary notation, compiler, microcode, RISC

 Example of machine language for the text “Hello World”.

 01001000 0110101 01101100 01101100 01101111 00100000

01010111 01101111 01110010 01101100 01100100.

2)ASSEMBLY LANGUAGE :

The assembly language is considered a low-level


language for microprocessors and many other programmable devices. The
assembly language is also considered as second-generation language. The
first generation language is machine language. Each personal computer has a
microprocessor that manages the computer's arithmetical, logical, and control
activities.
Each family of processors has its own set of instructions for handling various
operations such as getting input from keyboard, displaying information on screen and
performing various other jobs. These set of instructions are called 'machine language
instructions'.
A processor understands only machine language instructions, which are strings of 1's
and 0's. However, machine language is too obscure and complex for using in software
development. So, the low-level assembly language is designed for a specific family of
processors that represents various instructions in symbolic code and a more
understandable form.
Advantages of Assembly Language
Having an understanding of assembly language makes one aware of −

 How programs interface with OS, processor, and BIOS;


 How data is represented in memory and other external devices;
 How the processor accesses and executes instruction;
 How instructions access and process data;
 How a program accesses external devices.
Other advantages of using assembly language are −
 It requires less memory and execution time;
 It allows hardware-specific complex jobs in an easier way;
 It is suitable for time-critical jobs;
 It is most suitable for writing interrupt service routines and other memory resident
programs
3)HIGH LEVEL LANGUAGE:
The high-level language is easy to understand and the
code can be written easily as the programs written are user-friendly in a
high-level language. The other advantage of code written in a high-level
language is the code is independent of a computer system which means the
code can be transferred to other machines. The high-level of language uses
the concept of abstraction and also focus on programming language rather
than focusing on computer hardware components like register utilization or
memory utilization.

High level language is much closer to human language so it


is more suitable to write code in high level language. It is
more or less independent of the particular type of computer
used (i.e. more portable) and has its own set of rules called
syntax. Its main advantage is that it is easier to read, write
and maintain. The first high level programming languages
were designed in the 1950s. Now there are dozens of such
languages available such as BASIC, COBOL, C, C++,
FORTRAN, LISP, PASCAL, prolog, etc. This language is lot
slower in terms of execution as compared to low level
language. Compiler or interpreter is used to convert high
level language to machine language.
The examples of high-level language are C++, C, JAVA, FORTRAN, Pascal,
Perl, Ruby, and Visual Basic.
The few examples are as follow
.)JAVA: The JAVA programming language is an object-oriented language
that is based on objects and classes.
.) C: The C is a procedural and general-purpose programming language used
for writing programs.
.) PASCAL: The Pascal is a procedural programming language which
is based on data structures.

Q3)what is the difference between C and C++ language ?


ANS: DIFFERENCE B/W C AND C++ LANGUAGE:-

Both C and C++ are the most widely implemented computer


programming languages, but they are quite different in nature. C was originally
developed by Dennis Ritchie at AT&T Bell Labs between 1969 and 1973, whereas
C++ was developed from C by Bjarne Stroustrup at Bell Labs in 1983. Below are
listed the some of the basic differences between C and C++:

C programming language
C is a middle level computer programming language developed at Bell Lab at
1972 by Dennis Ritchie, C is considered as Middle Level Language because of its
features. C language contains features of Low Level Language as well as High
Level Language.

C++ programming language


C++ computer programming language was developed by Bjarne Strostroup in
1980. C++ is the super set of containing features of C programming language
and Simula67. C++ introduced the concept of Class and Objects.

o Definition

C is a structural programming language, and it does not support classes and


objects, while C++ is an object-oriented programming language that
supports the concept of classes and objects.

o Type of programming language

C supports the structural programming language where the code is checked


line by line, while C++ is an object-oriented programming language that
supports the concept of classes and objects.

o Subset

C++ is a superset of C programming language. C++ can run 99% of C code


but C language cannot run C++ code.

o Security

In C, the data can be easily manipulated by the outsiders as it does not


support the encapsulation and information hiding while C++ is a very secure
language, i.e., no outsiders can manipulate its data as it supports both
encapsulation and data hiding. In C language, functions and data are the free
entities, and in C++ language, all the functions and data are encapsulated in
the form of objects.

o Input/Output functions

In C, scanf and printf functions are used for input and output operations,
respectively, while in C++, cin and cout are used for input and output
operations, respectively.

Q4) BRIEFLY EXPLAIN THE HISTORY OF C LANGUAGE ?

ANS: HISTORY OF C PROGRAMMING LANGUAGE :


C has often been termed as a "Pseudo high level language" or a "Middle level

language" by many programmers. This is not because of its lack of

programming power but because of its capability to access the system's low

level functions. In fact C was invented specifically to implement UNIX. C

instructions are compiled to assembly code, therefore, depending on the

complexity of the code and on the compiler optimization capabilities, C code

may run as fast as assemby.

Ken Thompson created the B language in 1969 from Martin Richard's BCPL

(Basic Combined Programming Language). He used assembly language and

B to produce the initial versions of the UNIX operating system. BCPL and B

were typeless languages in which variables were simply words in

memory. Dennis Ritchie of Bell Laboratories later converted B into C by

retaining most of B's syntax in 1972 and wrote the first compiler. This was

implemented on DEC's PDP 11 and it was first used as the system's language

for rewriting the UNIX operating system. Later on, UNIX, its tools and C

grew simultaneously. In 1978, Kernighan and Ritchie wrote a book entitled

'The C Programming Language' that became the language definition for

almost a decade. Beginning in 1983, the ANSI X3J11 committee was asked
to standardize the C language. The result was ANSI C, a standard which was

adopted in 1988. It is not forced upon any programmer, but since it is so

widely accepted, it would be economically unwise for any systems

programmer or compiler writer not to conform to the standard.

FEATURES OG C LANGUAGE:

· C is a procedure-based programming language. This means the program

is viewed as a means to solve a problem. Various functions modules or

code blocks are thus, written to solve this problem.

· C functions can accept parameters and return values and perform

variety of tasks like input from the user, displaying the information, etc.

· C is simple and easy to learn and use. The main components like built-

in functions, operators, keywords are small in number.

· In C, errors are checked only at compile time. The compiled code

though have no safety checks for bad type casts, bad array indices, or

bad pointers.

· C works best for small projects where performance is important.

· C contains the capability of assembly language with the features of high

level language which can be used for creating software packages,

system software etc.

· C is highly portable. C programs written on one computer can run on

USES OF C :
C's wide acceptance and efficiency is the reason why libraries of several
other applications are often implemented in C. Some of the applications
using C in its kernels are:
Uses of C are many in addition to Systems programming. Some of
which are as follows :
o Language compilers and interpreters
o Device drivers
o Telecom applications
o Network programming
o Digital Signal processing applications
o Database applications
o Text editors
FUTURE OF C
The current popularity of C++ may seem to have displaced C's position
in the programming world. But C is here to stay for a very long time.
One main factor is that C++ has inherited most of its syntax from C but
has incorporated several new concepts which form the basis of Object
Oriented programming. It is better to know C in order to learn C++
though there are many who advocate the theory that one has to unlearn
procedural programming habits in order to learn Object Oriented
programming. GUI based C++ programming environments are more
popular, and use lot of disk space and extended memory. They use
complex class libraries and are not well suited for developing small
programs that run on smaller systems. C is a better option when it
comes to programming device drivers, embedded applications and
utility programs.

You might also like