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

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

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

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 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

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

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

 The function strcmp () is widely used in sorting of lists of names. Let S1 and S2 be the names of two strings. The function compares lexicographically (dictionary style) string S1 with string S2. It returns -1, 0, 1, respectively, if S1 is less than S2 , equal to S2, or greater than S2. Program illustrates its application.

 

Page 6 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.