Thursday, May 21, 2020

Return Values using functions in C++


  • Program :

#include <iostream>
using namespace std;
int myFunction(int x) {
  return 10 + x;
}

int main(){
  cout <<"\n----------------FUNCTION PARAMETERS----------------\n";
  cout <<"\n----------------Return Values----------------\n";
  cout << myFunction(8);
  return 0;
}




  • Output :


No comments:

Post a Comment

Function Overloading in C++

https://monitechvenkat1620.blogspot.com Program : #include <iostream> using namespace std; int c(int x, int y) {   return...