by Dinesh Thakur Category: Functions

Whenever a function is invoked, a set of operations is performed which includes passing the control from the calling function to the called function, managing stack for arguments and return values, managing registers, etc. All these operations take much of compiler time and slow down the execution process. This overhead can be avoided by using macros in a program. However, macros are not considered as true functions, as they do not perform type checking. Another way to make function calls execute faster and also perform type checking is to make the function inline.



 
by Dinesh Thakur Category: Functions

Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This capability is called function overloading. When an overloaded function is called, the C++ compiler.

 
by Dinesh Thakur Category: Functions

As we know that when we call the Member Function from the Class then the Compiler will jump to that Function and after Executing all the Statements the Compiler will execute the Remaining Statements.

 
by Dinesh Thakur Category: Functions

As we know that Private data of a Class can’t be Accessed with the help of an Object. Means if a Class Contains Some Data Members those are Private in nature then we cant Accessed those data Members with the help of an Object, from Outside the Class. So that if we want to do this. Then we must have to use the Friend Function. If a Function declared by using the Friend Keyword, then they can use the Private Data of a Class with the help of an Object.

 
by Dinesh Thakur Category: Functions

As we Know that For Accessing any thing means Data Members and Member Functions from a Class we must have to Create an Object First, So that When we Creates an Object of Class , then all the Data of Class will be Copied into an Object so that this will Consume Some Memory So that double Memory will be used for Storing the Data of single Class. First, Memory used by Class for storing his data and Second by Object.

 
by Dinesh Thakur Category: Functions

Functions are used for Placing or Storing the Code which is to be Repeated Several Times. For Example, if we need Same Code, then we must have to Write that Code Again and Again So that for Removing this Task, we uses functions.

 
by Dinesh Thakur Category: Functions

As the name suggest Override means to hide or Remove the Detail which is already Exists .Method or Function Overriding always Occur in the Inheritance, when a base Class and Derived Class both have a same name of Method. Then we will call that Method then this will Call the Method of Derived Class and Override the Body of Base Class Method.

 
by Dinesh Thakur Category: Functions

1) Call by Value:-when we call a Function and if a function can accept the Arguments from the Called Function, Then we must have to Supply some Arguments to the Function. So that the Arguments those are passed to that function just contains the values from the variables but not an Actual Address of the variable.

 
by Dinesh Thakur Category: Functions

When a Function can call itself again and Again or When a Function call itself until a Condition is not to be False. When a function definition includes a call to itself, it is referred to as a recursive function and the process is known as recursion or circular definition. In this a function call itself repeatedly. In the Recursion we just have to make a One Time call and the will automatically call itself Again and Again.

 
by Dinesh Thakur Category: Array Pointer and Union

When an element of a structure has to be accessed through pointer, then the -> operator is used. It is essential to initialize the pointer before it accesses any structure element.

 
by Dinesh Thakur Category: Array Pointer and Union

Structure elements can be referenced by writing the structure variable before the structure element. The structure variable and the structure element are separated by a dot (.) which is called the dot operator. For example

 
by Dinesh Thakur Category: Array Pointer and Union

This method assumes that the set of elements in a list is first arranged in ascending or descending order. The list is initially divided into two parts and the mid point is found. If the number to be searched is less than the value of the element at the mid point, it implies that the given number lies in the first part of the list, otherwise the given number lies in the second part of the list. This is illustrated as follows:

 
by Dinesh Thakur Category: Array Pointer and Union

The linear search procedure gives the method of finding whether an element is present in a set of elements (array) or not. The given element is compared with each element in the set one by one. The process is repeated until a perfect match is found. The array comprises of unsorted elements.

 

Page 9 of 18



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.