Answers for "how to initialize function in c++"

C++
21

how to declare a function in c++

// function example
#include <iostream>
using namespace std;

int addition (int a, int b)
{
  int r;
  r=a+b;
  return r;
}
Posted by: Guest on March-04-2020
0

statement that causes a function to end in c++

Return statement. The return statement stops execution and returns to the calling function. When a return statement is executed, the function is terminated immediately at that point, regardless of whether it's in the middle of a loop, etc.
Posted by: Guest on November-22-2019

Browse Popular Code Answers by Language