0% found this document useful (0 votes)
345 views2 pages

Lecture - 1 (Dit 1, Book C&C++)

C was created in 1972 by Dennis Ritchie at Bell Labs for use with UNIX. It was originally written in assembly language but was later rewritten mostly in C. In 1980, Bjarne Stroustrup began extending C to create C++ at Bell Labs. Some key differences between C and C++ are that C++ is object-oriented with features like classes, inheritance, and overloading while C is procedural. C++ also supports return functions, constructors, and destructors that are not in C. The basic structure of a C/C++ program includes preprocessor directives, a main function that acts as the program entry point, and statements within the main function body.

Uploaded by

shayan zafar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
345 views2 pages

Lecture - 1 (Dit 1, Book C&C++)

C was created in 1972 by Dennis Ritchie at Bell Labs for use with UNIX. It was originally written in assembly language but was later rewritten mostly in C. In 1980, Bjarne Stroustrup began extending C to create C++ at Bell Labs. Some key differences between C and C++ are that C++ is object-oriented with features like classes, inheritance, and overloading while C is procedural. C++ also supports return functions, constructors, and destructors that are not in C. The basic structure of a C/C++ program includes preprocessor directives, a main function that acts as the program entry point, and statements within the main function body.

Uploaded by

shayan zafar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

Computer Programming C & C++ D.

IT-I

HISTORY OF C AND C++


C is a general-purpose, procedural, computer programming language developed in 1972 by Dennis Ritchie at the
Bell Telephone Laboratories for use with the UNIX operating system.
The original version of the UNIX system was developed in assembly language. Later, nearly all of the operating
system was rewritten in C.
In 1980, Bjarne Stroustrup, from Bell labs, began to extend of the C language. In October 1985, the first
commercial release of the language appeared as well as the first edition of the book "The C++ Programming
Language" by Bjarne Stroustrup.

C++ LANGUAGE:-
C++ is objected Oriented Programming language which the modern programing method. C provides a
comprehensive set of features for handling a wide variety of applications, such as systems development and
scientific computation. Borland and turbo C++ etc., text editors are used to write the program of c++. The program
is saved with the C++ extinction as abc.CPP which means C plus plus.

DIFFERENCES B/W C AND C++:


 C++ is complete computer programing language while c is the sub part of the C++.
 C does not have any classes or objects. It is procedure and function driven. There is no concept of access
through objects and structures are the only place where there is a access through a compacted variable.
c++ is object oriented.
 C functions do not support overloading. Operator overloading is a process in which the same function has
two or more different behaviors based on the data input by the user.
 C has a top down approach whereas c++ has a bottom up approach.
 There is no return function while c++ has return functions.
 There is no constructor and destructor in C language while C++ has.

STRUCTURE OF C/C++ PROGRAM:


The basic fundamental components that every C program has is known as structure of program.

THE PREPROCESSOR DIRECTIVES: it contains header file which is also known as library. It contains system
define functions. If we want to use any function in program we must have to open the concern library in which it
has.

Apostle Degree College Nowshera Cantt Page 1


Computer Programming C & C++ D.IT-I

main () function: each and every program of C or C++ there must be main() functions, Because it is for the
compiler. The main function is the point by where all C programs start their execution. It has start and stop body
“{}”. which defines that from where the function will be started and where will be ended.
BODY OF THE MAIN FUNCTION S: it contains the actual statements for any program.

FIRST PROGRAM IN C++:

Simple program in C language to “show Hallow world” on the screen.

RESERVED WORD:-
A word which is predefined in a language for specific meaning is called reserved word. These are also called
keywords. These word give us special meanings in a language. The C++ language has also many reserved words like
int, void, cout and cin etc. all the key words are defined in lower case.

Apostle Degree College Nowshera Cantt Page 2

You might also like