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.

 

Page 1 of 6



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.



Related Articles