function without argument with return value in c++

Publié le: 01 janvier 1970
sur la chaîne: Tarun Sir
646
17

In this video i will teach you that how to create function without argument, with return value in c++.

Function without argument, with return value
In this type of function, we perform input and calculations in the function definition (body).
The result is returned using the return keyword. A function can return only one value at a time.
When value is returned using return keyword the control is transferred from the called function to the calling function.
Declaration:
returndatatype functionname();
Definition
returndatattype functionname()
{ //code goes here
return value;
}
Call
Var=Functionname();

Note: If a function is created with return type then it can be called from the RHS of assignment operator or in the expression.
Q: WAP to create a function which returns sum of two numbers.


www.tarunsir.com
www.cinstitute.org.in

Connect me on linkedin
  / tarrunverrma  

Follow on instagram
  / the_ultimate_coding_stuff  

Follow on twitter
  / tarrunverrma  

#tarunsir #cpptutorial #learnprogramming #coding #function #udf


Sur cette page du site, vous pouvez voir la vidéo en ligne function without argument with return value in c++ durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Tarun Sir 01 janvier 1970, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 646 fois et il a aimé 17 téléspectateurs. Bon visionnage!