Skip to main content

Free notes of C++ language theory ,12 th HSC (part 1)

 What is c++ ? What is the advantages of c++ ?


C++ is an object oriented programming language Initially c++ was name as “c with classes”. C++ was developed by Bjarne stroustrup at & T Bell Laboratories , usa , in the early eighties . Advantages of c++ over c are :


(1) c++ is an incremented version of of c . It is sperset of c. almost all c programme are also run in c++ compiler .


(2) The important faculties added in c++ are classes , function overloading , operator overloading .


(3) C++ allow user to create abstract data type , to inherit properties from existing data type .


(4) c++ supports polymorphism .


(5) Any real life application systems such as editor , compiler , database , communication system can be built by c++.


(6) Object oriented libraries can be built by c++.


(7) c++ programs can be easily implemented , maintained and expanded.


What do you mean by object based programming language and object oriented programming language? State the relationship between these language .


 Object based programming language:


(1) language that supports programming with object are said to be object based programming language .


(2) it is a style of programming that primarily supports encapsulation & object or identity.


(3) Major feature are :


(a) Data encapsulation

(b) Data hiding & access mechanism.

(c) Automatic initalization & clean-up objects

(d) operator overloading .

(4) They do not support inheritance & dynamic binding .


Object- oriented programming language:

(1) This language incorporates all the object based feature along with inheritance and dynamic binding .

(2) For eg. – c++, smalltalk.

The relation between them characterized by followings statement :

Object oriented programming =. Object based feature + inheritance + dynamic binding .


Advantages of object oriented programming : (1) through , inheritance , eliminate redundant code and extend the use of existing classes. (2) The principle of data hiding helps the programmer to build secure program. (3) It is possible . To have multiple instances of an object to co exist without any interference . (4) It is easy to partition the work in a ; project based on object .


Advantages of object oriented programming :

(1) through , inheritance , eliminate redundant code and extend the use of existing classes.

(2) The principle of data hiding helps the programmer to build secure program.

(3) It is possible . To have multiple instances of an object to co exist without any interference .

(4) It is easy to partition the work in a ; project based on object

(5) Oop system can be easily upgraded from small to large system .

(6) Software complexity can be easily manage .

(7) It is possible to map object in the problem domains to object in the program .

(8) Good message passing technique for communication between object.

(6) Software complexity can be easily manage .

(7) It is possible to map object in the problem domains to object in the program .

(8) Good message passing technique for communication between object.

Data types

• C++ allows user to create new abstract data types , which can behave like any built in data types.

• These are called user-define data types. These includes structure ,union, class , enumeration.

• C++ provides three built-in data types which are integral , void, floating .

• Integral includes integer and character while floating type include float and double

• In addition to these data types C++ provide user with array , function , and pointer which are called as derived data types.

Enlist the basic data types used in c++ with size of data in term of bytes for each .

There are three main basic built – in data types used in c++ viz. integral type , void and floating type.


 Integral data type :

It include integer (int) and characters (char) .

An int variable requires 2 bytes to store , while a character variable requires 1 byte.

Integer variables are also of two types :

(a) short int (b) long int.

long integer requires 4 bytes , while short integers requires 2 bytes .


Void data type :

 Void data type is used :

(a) to specify the return type of a function when it is not returning any value .

(b) to indicate an empty argument list to a function .

(c) to declare generic pointers .

Floating type :

 Floating type variables are of two types ; float and double.

A float variables requires 4 bytes , while double requires 8 bytes to store in memory .

 There is another kind of double namely long double , which requires 10 bytes to store in memory .

Write a short note on scope resolution operator ? (oct. 2014 ; mar. 2016 )

(1) The operator :: is called as scope resolution operator .

(2) C++ is a block structure language i.e a c++ program may contain one block within another block .

(3) When a variables is declared in program , scope extends from the point of declaration till the end of the block in which it is defined .

(4) The same variables name can be used to have different.

Comments

Popular posts from this blog

Free notes of Biomolecules short revision part 1

Biomolecules Polysaccharide are not sweet in taste.               All monosaccharides are reducing sugar.         Monosaccharides are starting from carbon number 3.                                                                Starch contain amylose and amylopectin amylose contain bonding between c1 -c4 and amylopectin has c1-c6 bonding in their structure.                                                                 Monomers: a)Lactose : 1) beta -D galactose 2)beta - D glucose.                                   ...

Free notes of surface tension

  Surface tension.         Intermolecular forces:- The forces of attraction and repulsion between their molecules . These forces ,are called intermolecular . Their is to forces 1) cohesive force.  2) adhesive force. Cohesive force:- the force of attraction between 2 molecules of same substance called as cohesion. Adhesive force:- the force of attraction and repulsion between the two different substance like liquid and solid ,solid with gas etc. is called adhesion. Range of molecular forces:- The maximum distance between 2 molecules upto which intermolecular forces are effective (also called as short range forces). Distance (10 to the power -9). Sphere of influence :- an imaginary sphere drawn with given molecule as centre and radius equal to the molecular range . Surface film :- The layer of surface of liquid whose thickness is about equal to range of molecular attraction. Surface energy :- when a molecular is taken from the inside to the surface layer work...

Free notes of Biomolecules short revision part 2

  Biomolecules part 2. DNA has bases like adenine , gunine , cytosine , thymine.                                                  RNA has bases like adenine, gunine , cytosine , urasil.                                                        Adenine have hydrogen bond with thymine and cytosine have hydrogen bond with gunine.                                                                       D- fructose , D - manose ,D- glucose , form a same osazone product .                        ...