Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

class is user defined datatype.

built in types are---


int-2/4 bytes
float-4bytes
char-1bytes
user defined types are---
struct handle int,float,char...
union handle i,f,c..
class handle i,f,c...
it contain heterogeneous type of data.

CLASSES IN C++
oop-- encapsulates data and functions into packages called classes.
object-- is a collection of data members and associated member functions.
class is a single unit .
;-this show the termination of class.
::-scope resolution operator.To define member function outside class.

INLINE FUNCTIONS--
this function complier replace function call with corresponding function code but
control not jump to function.

ACTUAL AND FORMAL PARAMETER--


actual parameter are those that are used during a function call.
formal parameter are those that are used during a function declaration and function
definition.

PROTOTYPE OF FUNCTION--
this describe the function interface to the compiler by giving details such as the
no. and type of arguments and the return values.

RECURSION--
the fuction call itself.

FUNCTION OVERLOADING--
->a function is overloading when same name is given to different function.
->the same function name will be used with different number of parameters and
parameters of different type.
->typically,function overloading is used wherever a different type of a data is to
be dealt with.

STATIC DATA MEMBER ---


*irrespective of the number of objects created only a single copy of the static
member created in memory.
*all objects of class SHARE the static member.
*static members are declared inside a class.
*it is defined outside the class.

FRIEND FUNCTION:--
->this function can use the data class.
->TO ALLOW ACCESS TO PRIVATE OR PROTECTED DATA IN A CLASS FROM OUTSIDE THE CLASS.
->KEYWORD--"FRIEND"
->A FRIEND FUNCTION IS USED FOR ACCESSING THE NON PUBLIC MEMBERS OF A CLASS.
->IS AN ORDINARY FUNCTION OR ANOTHER CLASS.

FRIEND CLASS---
->friend class is a class which is able to access private or protected members of
another class.
->the friend keyword is used during declaration of friend class inside the body or
definition of another class.
->we are passing arguments or parameters has object of another class in function
definition as well as function call of friend class.

You might also like