[go: up one dir, main page]

0% found this document useful (0 votes)
30 views26 pages

Lecture No.02

This document provides a lesson agenda on programming fundamentals that includes a brief history of C++, required tools, development environment, and integrated development environments (IDEs). It discusses how C was developed in the 1960-70s and the creation of C++. It outlines the basic tools needed like editors, compilers, debuggers, linkers, and loaders. It also introduces 10 common IDEs used for C++ development like Dev C++, Visual Studio Code, Code::Blocks, Eclipse, and Qt Creator.

Uploaded by

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

Lecture No.02

This document provides a lesson agenda on programming fundamentals that includes a brief history of C++, required tools, development environment, and integrated development environments (IDEs). It discusses how C was developed in the 1960-70s and the creation of C++. It outlines the basic tools needed like editors, compilers, debuggers, linkers, and loaders. It also introduces 10 common IDEs used for C++ development like Dev C++, Visual Studio Code, Code::Blocks, Eclipse, and Qt Creator.

Uploaded by

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

In the Name of

Allah
The Most Merciful and Compassionate the most
gracious and beneficent, Whose help and
guidance we always solicit at every step, at every
moment.
Programming Fundamentals

Shabir Ahmad Kundi

Gomal University Tank Campus


Programming Fundamentals

Lesson Agenda

1. Brief History of C++

2. Tools Required

3. Development Environment of C++

4. Integrated Development Environment IDE

4
Programming Fundamentals

 The C language was developed in late 60’s and early 70’s, in


Bell Laboratories. In those days BCPL and B languages were
developed there.
 The BCPL language was developed in 1967 by Martin Richards
as a language for writing operating systems software and
compilers.
 In 1970 Ken Thompson used B language to create early
versions of the UNIX operating system at Bell Laboratories.
 Thus both the languages were being used to develop various
system software even compilers.

5
Programming Fundamentals

 Both BCPL and B were ‘type less’ languages, every data item
occupied one ‘word’ in memory and the burden of treating a data
item as a whole number or real number, for example was the
responsibility of the programmer.
 Dennis Ritchie developed a general purpose language, called C
language, by using different features of BCPL and B languages.
 C uses many important concepts of BCPL and B while adding data
typing and other features. In the start C became widely known as
the development language of the UNIX operating system, and the
UNIX operating system was written by using this C language.

6
Programming Fundamentals

 The C language is so powerful that the compiler of C and other


various operating systems are written in C.
 C language has almost unlimited powers to do with computers.
You can program to run on or off any device of computer. You
can do a lot to hard disk and other peripherals. It is very easy
to write a program in C that stops the running of computer.
 The C language and UNIX operating system widely spread in
educational and research institutions. There was C and UNIX
everywhere.

7
Programming Fundamentals

 Born: July 21, 1940 (age 80 years)

8
Programming Fundamentals

 Born: February 4, 1943 (age 77 years)

9
Programming Fundamentals

 Born: September 9, 1941


 Died: October 12, 2011

10
Programming Fundamentals

 Due to the wide spread of C, different researchers started to


add their features in the language. And thus different
variations in C came into existence.
 Many universities developed their own C by adding different
features to the C language developed by Ritchie.
 These variations led to the need of a standard version of C.
 In 1983 a technical committee was created under the
American National Standards Committee on Computer and
information Processing to provide an In unambiguous and
machine-independent definition of the language.

11
Programming Fundamentals

 In 1989 the standard was approved. ANSI cooperated with the


international Standard Organization (ISO) to standardize C
worldwide.
 C++, an extension of C, was developed by Bjarne Stroustrup in
the early 1980s at Bell Laboratories.
 C++ provides a number of features that are same as in C
language, but more importantly, it provides capabilities for
object-oriented programming.
 So in this course we are going to study the C++ language but
we will cover its same functionalities like that of C-Language.

12
Programming Fundamentals

 Born: Born: December 30, 1950

13
Programming Fundamentals

 As programmer we need different tools to develop a program.


These tools are needed for the life cycle of programs.
 Following are the tools that are needed to write a complete C
program:
 Editors
 Compiler and Interpreter
 Debugger
 Linker
 Loader

14
Programming Fundamentals

 First of all we need a tool for writing the code of a program. For
this purpose we use Editors in which we write our code.
 We can use word processor too for this, but word processors
have many other features like bold the text, italic, coloring the
text etc.
 So when we save a file written in a word processor, lot of other
information including the text is saved on the disk.
 For programming purposes we don’t need these things we only
need simple text. Text editors are such editors which save only
the text which we type. So for programming we will be using a
text editor.

15
Programming Fundamentals

 we write the code in English and we know that computers can


understand only 0s and 1s. So we need a translator which
translates the code of our program into machine language.
 There are two kinds of translators which are known as:
a) Interpreter and
b) Compilers.
 These translators translate our program which is written in C-
Language into Machine language.

16
Programming Fundamentals

 Interpreters translates the program line by line meaning it reads


one line of program and translates it, then it reads second line,
translate it and so on.
 The benefit of it is that we get the errors as we go along and it is
very easy to correct the errors. The drawback of the interpreter
is that the program executes slowly as the interpreter translates
the program line by line.
 Another drawback is that as interpreters are reading the
program line by line so they cannot get the overall picture of the
program hence cannot optimize the program making it efficient.

17
Programming Fundamentals

 Compilers also translate the English like language (Code written


in C/C++) into a language (Machine language) which computers
can understand.
 The Compiler read the whole program and translates it into
machine language completely.
 The difference between interpreter and compiler is that
compiler will stop translating if it finds an error and there will be
no executable code generated whereas Interpreter will execute
all the lines before error and will stop at the line which contains
the error.
 So Compiler needs syntactically correct program to produce an
executable code. We will be using compiler in our course

18
Programming Fundamentals

 Another important tool is Debugger.


 Every programmer should be familiar with it. Debugger is used
to debug the program i.e. to correct the logical errors.
 Using debugger we can control our program while it is running.
We can stop the execution of our program at some point and
can check the values in different variables, can change these
values etc.
 In this way we can trace the logical errors in our program and
can see whether our program is producing the correct results.
This tool is very powerful, so it is complex too

19
Programming Fundamentals

 Most of the time our program is using different routines and


functions that are located in different files, hence it needs the
executable code of those routines/functions.

 Linker is a tool which performs this job, it checks our program


and includes all those routines or functions which we are using
in our program to make a standalone executable code and this
process is called Linking

20
Programming Fundamentals

 After a executable program is linked and saved on the disk and it


is ready for execution. We need another process which loads the
program into memory and then instruct the processor to start
the execution of the program from the first instruction (the
starting point of every C++ program is from the main function).

 This processor is known as loader. Linker and loaders are the


part of development environment. These are part of system
software.

21
Programming Fundamentals

22
Programming Fundamentals

 An integrated development environment (IDE) is a


software application that provides comprehensive
facilities to computer programmers for software
development.
 An IDE normally consists of a source code editor,
compiler/ interpreter or both, debugger, linker and
loader. Most modern IDEs have intelligent code
completion.

23
Programming Fundamentals

1. Dev C++

2. Visual Studio Code

3. Code:: Blocks

4. Eclipse

5. CodeLite

24
Programming Fundamentals

6. NetBeans

7. Sublime Text

8. Qt Creator

9. Brackets

10. Atom

25
End of Lecture # 02

Thanks
Questions?

You might also like