Review products and earn money. Learn more
Earn advertising credits on boddunan. Click here to learn more.
Articles Education Computer Science FUNCTION IN C++ PART-2

FUNCTION IN C++ PART-2

 


FUNCTION IN C++ PART-2


Now we are going continue with FUNCTION IN C++ PART-2 with more explanations regarding Function In C++........lessen carefully...


Function Definition:


The first line is called function declarator and is followed by function body.The block followed by function declarator is called as function definition.


Function Call:


Function gets activated only when a call to function is invoked.A function must be called by its name, followed by argument list enclosed in parenthesis and terminated by semi colon.


Arguments:


Actual Arguments:


The arguments declared in the caller function and given in the function call are called as actual arguments.


Formal Arguments:


The arguments declared in the function declarator are known as formal arguments.


 


Return Statement:



  • The return statement is used to return values to the caller function.



  • The return statement returns only one value at a time.


 


Passing The Arguments:



  • Call by value (pass by value)


The value of actual argument is passed to the formal argument and operation is done on the formal arguments.Any change in the formal argument does not affect the actual argument because the formal arguments are photocopy of actual arguments.


  • Call by address (pass by address)



  1. Instead of passing values, addresses are passed.

  2. Function operates on address rather than values.

  3. Formal arguments are pointers to the actual arguments.

  4. Changes made in the arguments are permanent.




  • Call by reference (pass by reference)


 


Inline Function:


The c++ provides a mechanism called inline function. When a function is declared as inline, the compiler copies the code of the function in the calling function. i.e. function body is inserted in place of function call during compilation.The inline function is mostly useful when calling function is small. The inline mechanism increases execution performance in terms of speed. The program using the inline functions needs more memory space since the inline functions are copied at every point where the function is invoked.


 


 


So thats all about FUNCTIONS IN C++ basics you need to know about.....enjoy reading....


Thankyou,


Rajkumar


 


 


User reviews

There are no user reviews for this listing.

To write a review please register or log in.
 
 
 
Author Articles
More from this author:
THE WAY WE LIVE IT (305 Hits)
Miscellaneous > General Reference
We are born to live, but its not a concern that how we live it. We are born just not to have joy and rather not to worry throughout the life, but we...
WHO AM I (255 Hits)
Miscellaneous > General Reference
THE REAL YOU.........? The world respects us as the way we respect ourselves. The world will call you an inefficient if you ever think that "I...
PEOPLE GO ABROAD? (406 Hits)
People & Places > Social Life
Work In Abroad??? The world we live in today is more passionate, competitive and more space to get lost and we ought to know how to survive. ...
PROJECT PLANNING AND MANAGEMENT (285 Hits)
Business & Finance > Other
PROJECT PLANNING AND MANAGEMENT A New Technique..........? Let me explain you what is PROJECT PLANNING AND MANAGEMENT.  This whole cool...
KNOW HOW TO WRITE AN ARTICLE? (352 Hits)
Education > Arts & Science
HOW TO WRITE AN ARTICLE? Well, for who are members of boddunnan.com( where Information Is REALLY Wealth$$) knows that writing an article or 'just'...
JAWAHARLAL NEHRU (493 Hits)
People & Places > Social Life
  Remember Him???? Well he was one of well-known freedom fighter, now if anybody wants to know about his birth place or any other stuffs you can...
ADVERTISEMENT (314 Hits)
Business & Finance > Small Business
ADVERTISEMENTS Advertisements are public announcements or notifications through posters, placards and journals and radio and television and...
Related Articles
Related Articles:
Function to Fill data in Combobox control in vb.net (901 Hits)
santoshkumarsingh
Programming > .Net
 public Boolean FillCombo(ref DropDownList DD1, string DisplayColumn, string ValuColumn, string TableName)             catch (Exception...
Function of skin (247 Hits)
10000001
Education > Arts & Science
  Skin care The flexible covering of human or animal body is called skin. It is one of the sense organs of our body. It helps us to feel the...
Function prototype (290 Hits)
santoshkumarsingh
Programming > C & C++
//////////////////////////////////////// #include // Function prototype. void ErrorMsg(); //////////////////////////////////////// // The main()...
Function Prototype Example (with Function arguments) (322 Hits)
santoshkumarsingh
Programming > C & C++
//////////////////////////////////////// #include // Prototype void show(int = 1, float = 2.3, long = 4); ////////////////////////////////////////...
String copy function in c++ (225 Hits)
santoshkumarsingh
Programming > C & C++
//////////////////////////////////////// #include //////////////////////////////////////// // The first version of string_copy()....
Call C function from C++ program (335 Hits)
santoshkumarsingh
Programming > C & C++
/*////////////////////////////////////*/ #include #include /* Prototype of the C++ function. */ int...
Export to PDF function in vb.net (332 Hits)
santoshkumarsingh
Programming > .Net
#Region "ExporttoPDF"     Public Sub ExportToPDF2(ByVal strRptName As String)         Dim strParam As String = ""         Dim...
Latest Articles
Latest Articles:
How to Control Anger (25 Hits)
khushi
Health & Fitness > Yoga & Excercises
Why do we get angry? Anger is also known as short madness. Generally we get angry when things don't work like we want them to work. For some...
Worm holes (46 Hits)
611995
Science & Nature > Space
WORM HOLES :- The person who wants to be a time traveller must know about wormholes. It is the one of the way to dilate the real space time....
Social media and marketing (13 Hits)
Binief
Business & Finance > Small Business
From the start, social media had a significant touch on  every one of us. Social media commenced as a way for people to either get in touch or...
Internet marketing (13 Hits)
Binief
Business & Finance > Small Business
Are you an internet user who wishes to become a affiliate seller? Do you need to begin a home line of work and you've decided the affiliate...
Posters and marketing (13 Hits)
Binief
Miscellaneous > General Reference
This days, you should to be executing everything you perhaps could to advertise your business enterprise, peculiarly if you are carrying one of...
Stop smoking (12 Hits)
Binief
Health & Fitness > Personal Care
Smoking is a habituation that affects both the human who has the habit & the populate close to him or her. The content nicotine induced this...
Creative thinking (14 Hits)
Binief
Miscellaneous > General Reference
Creativeness supposes the creation of some philosophic ideas. Philosophy starts in wonderment! It commences at a degree while one gets imagining...
Most Read Articles
Most Read Articles:
CANDICE BERGEN (10968 Hits)
xaskoiking
People & Places > Celebrities
Hai friends in this article let us discuss about the 5 time Emmy award winner and 2 time Gold Globe award winning American Actress and model CANDICE...
Money making programs on boddunan.com (10316 Hits)
bnadmin
Boddunan.com is not only a platform to share knowledge and learn from the articles posted by other members but also provides an oportunity to make...
Understanding the Anatomy of Abdominal Muscles (10025 Hits)
soni2006
Education > Medicine & Surgery
To do any exercise correctly you need to know which muscles are involved and the movements they perform. Anatomically locating these...
Origami (9224 Hits)
ktkps
Miscellaneous > General Reference
We all would at some point in our childhood (and in college) folded papers to make rocket and other things.But we do not know the name for that...
History of Transportation – Your Complete Guide (9178 Hits)
soni2006
People & Places > Creators
Definition of transportation Transportation is a means of moving people or goods from one place to another. The modern commercial...
TOP 10 BICEPS EXERCISES PART 1 (8510 Hits)
sapu
Health & Fitness > Yoga & Excercises
Hi friends, well this article is exclusively for those men and may be, who knows even some girls who want to shape up their biceps by simple...
Jallianwala Bagh Massacre (8351 Hits)
xaskoiking
Miscellaneous > General Reference
#) More than 379 dead and 1500 plus were injured..... These are the number of victims of the cruel massacre by  a cruel man called dyer #)Shock...

Trackback(0)

TrackBack URI for this entry

Comments (1)

Subscribe to this comment's feed
...
kavishanigam
Some useful tips but could have elaborated more!!
kavishanigam , July 18, 2010

Write comment

smaller | bigger
security image
Write the displayed characters

busy

Sponsored Links

Leader Board

This Week
u.nataraj (758 Points)
neetu020784 (616 Points)
nagalakshmi.karunanidhi (608 Points)
Rupali (564 Points)
ceeem (413 Points)
sajeetharan (271 Points)
ra_k (269 Points)
kdeepti (266 Points)
sunnyrsingh (224 Points)
karthivignesh (124 Points)
Last
sajeetharan (1821 Points)
nagalakshmi.karunanidhi (1798 Points)
u.nataraj (1588 Points)
ra_k (1284 Points)
neetu020784 (1149 Points)
kdeepti (1029 Points)
Abid Areacode (947 Points)
sunnyrsingh (837 Points)
ceeem (715 Points)
yasomathi (492 Points)
Updated every 1 hour(s)

You are not logged in.

Boddunan Stats

  • 7089 registered
  • 7 today
  • 29 this week
  • 1823 this month
  • Last: jackiechan.aimer

Subscribe Newsletter

Server Time