You are on page 1of 10

A

Array : Array is a group of similar type of element stored in contagious


memory.
Access Specifier : Private:: All data members & member function are
not accessible from outside the class.
Public:: All data members & member function are Accessible outside
the class.
Protected:: All data member & member function are accessible inside
the class & in derived class.
Abstraction : Abstraction is a process of displaying only essential info &
hiding the details from user. Eg – ATM Matchin

C
C-language : C is mid-level & Structured Programming Language. Large
Programs are divided into smaller modules, each modules user
structured code.
C-language feature : Simple, Structured, Fast-speed memory
management , extensible.
Local-Variable Global-Variable
1. A variable declared inside a 1. A variable declared outsida
Block of code/ function is called Block of code/function called
a Local variable. a Global variable.
2. Scope of variable is available 2. Scope of variable is available
With in a function where it is through a program.
Is declared
3. Variable are Stored in a Stack 3. The compiler decider the
Unless specified. Storage location of available.

Call by Value Call by reference


1 When a copy of value is passed to 1 When a copy of value is passed to
Function, then the original value function then original value is
Is not modified. Modified
2 Actual argument and formal argu- 2 Actual argument formal argume-
ment are created separate nt are created in same
memory locations. memory location.
Copies of actual argument are pass The add of actual argument
to formal argument to there respective formalarg-
ument
C/C++:
C C++
1) It consists procedure oriented 1) It Consists object Oriented
Oriented programming language. Programming language.
2)C does not support data hiding 2) It is Support data hiding.
3)Calloc() & Malloc() fun’n are used 3) new operators is used for
for memory allocation & Free() are memory allocation & delete
used for memory deallocation, operator used for deallocation
Classes & object : A class is user defined data-type which has its own
data members & member function.
Object : Object is an instance of class. It is also data member of a class.
Constructor: Constructure have same name as class name.
Constructure run automatically when the object is created.
No return type is used for constructor.

D
Dynamic Memory Allocation: Here memory is allocated at runtime, &
can be increased while executing a program.
Malloc() Calloc()
1) It Allocate the memory at the 1) It initialized memory without
Time of execution of program. 0 values.
2) It stans for Memory allocation 2) Calloc stand for contiguous
memory allocation,
3) it allocate multiple block of 3) It allocate Single block of
memory at same time. Memory at same time.

Data-type in c++: Primitive data-type: int, char, float, long, short,


double;
Derived data-type: Array , pointer .
User defined datatype: Structure, Class
E
Encapsulation: Wrapping all data into single unit.
Encapsulation means we can combine data members & function that
operate together & put it in single class.
Exception handling: It is an advantage of c++ over 3 keywords
1) Try: It represent block of code that throw exception.
2) Catch: represent block of code that execution when exception is
thrown.
3) Throw: used to throw exception.

F
Function in c/c++ : They are used to avoid rewriting the same code
again and again in program.
• They are called from a any no of times & any places from program.

Friend Class: A friend class can access private , protected , public


members of another class which is declared as a friend.
Friend Function: Friend function declared inside the class but defined
outside the class. As a part of class member. It can access class
members & method of class.
Function Overloading: Two or more function having same name but
different parameter called function function overloading.
Function Overriding: This feature allows us to use a function in child
class which already present in its parent class.
G
Global: Global variable accessed globally in the entire program.
Local: Local variable can access with in a function or block while the are
defined.

I
Inline function: Compiler take a copy of code of function at each point
where function is called.
Inheritance: Inheritance allows us to defined a class that inherited all
methods & attributes from another class.

Base

B1 B2 B3 Derived
Single Inheritance: In this, class is allowed to inherited from only one
class.
Base

Derived

Multiple Inheritance: In this, class can inherited from more than one
classes. i.e. one derived class is inherited from more than one base
class. Eg – Child has 2 parent Father, mother
Base Base

Derived
Multilevel Inheritance: In this type derived class is created from
another class.
Base

derived

derived

Eg: Family Tree Grandpa base class father first derived class & son
second derived class.
Hierarchical Inheritance: More than one derived class Created from
single base class.
Base

D1 D2 D3

D1 D2 D3 D4
1
Eg: class-base class-Cars & Audi, Maruti, Kia are derived class.

M
Method Overloading: It is a process of overloading the method that has
same name but different parameters.
Method: Method is defined inside class
Method can be private public Protected
Method is called using object only.
O
Operator Overloading : It is ability to provide operator or a special
meaning for a data type this ability called operator overloading

P
Pointer: A pointer is a variable whose value is the address of another
variable.
Used- i) Accessing the Array element
ii) Call by reference
iii) DSA like linked-list, Queue
iv) Dynamic memory allocation
NULL pointer: A pointer that does not refer to any address of value but
NULL. When we assign 0 value to pointer it become null pointer.
Polymorphism: It is an ability of programming language to present the
same interfaces for several different data type. E.g. Same entity
behaves differently in different scenarios
Compile time polymorphism, runtime polymorphism.
Compile-time polymorphism Run-time polymorphism
- In this method, we would - In this method we come to know a
Come to know at compile time which know run time which method
Method will be called & the call called the call is not resolved by
Is resolved by the compiler. The compiler.
- Access at compile time - Access at run time.
- It is known as static binding or – It is known as dynamic or late
Early binding. Binding.
- Execution Speed High - Execution speed is low

R
Recursion: When a Function call itself, the process known as recursion
& this function is known as recursive function.
1) Winding phase: when a recursive function call itself & this phase
end when the condition is reaches.
2) Unwinding Phase: Unwinding phase starts when condition is
reached, & control return the original call.
Reference : A reference is like pointer its another name of an existing
variable. Once reference name is initialized with a variable by the
variable name or reference name both.

S
Static-Variable: Static variable can be defined inside or outside of a
class. There default value is 0 & they are alive till execution of
program. Used- Static is used with global variable to set their scope to
containing file in local variable static is used to variable in statically
allocated memory instead of memory.
Static memory Allocation: Memory is allocate at compile time & can’t
increases while executing program. It is allocate using static keyword.
It is implemented using stack or heap but it required pointer to access
Variable from static memory. It is faster than dynamic.
Structure: Structure is user defined datatype that allows storing
multiple type of data in single unit. It is defined Outside of class.
Structure & Classes:
Structure Class
1 members of structure are by default 1) members of class are
Public by default private.
2 when deriving structure access 2) when deriving class access
Specifier are public by default. Specifier are private by default.

T
Token: Taken is Smallest Individual unit in program. It is identifier. It can
be constant, keyword, string literate etc.

V
Virtual-function: Virtual function is a member function which is
declared with in a base class & redefined by derived class.
- It is defined virtual keyword.

You might also like