149k views
4 votes
Write the code to call a function whose name is send_number. There is one argument for this function, which is an int. Send 5 as an argument to the function.

User MPaul
by
7.0k points

1 Answer

2 votes

Answer:

program to this question can be defined as follows:

Program:

#include <iostream> //defining header file

using namespace std;

void send_number(int x) //defining method send_number

{

cout<<x; //print the value

}

int main() //defining main method

{

send_number(5); //calling a method

return 0;

}

Output:

5

Step-by-step explanation:

  • In the given C++ language program, firstly the header file is defined, in the next step, the method "send_number" is defined, in which an integer variable "a"passed as parameter, in which the print method is used, that prints its value.
  • In the main method, the method "send_number" is called, in which an integer value that is 5 is passed.
User FemtoRgon
by
6.9k points