Ask Question
5 November, 07:07

Which line in the following program contains the header for the showDub function? 1 #include 2 using namespace std; 3 4 void showDub (int); 5 6 int main () 7 { 8 int x = 2; 9 10 showDub (x); 11 cout << x << endl; 12 return 0; 13 } 14 15 void showDub (int num) 16 { 17 cout << (num * 2) << endl; 18 } 1. 4 2. 6 3. 10 4. 1

+1
Answers (1)
  1. 5 November, 08:56
    0
    The answer to this question is "15 line".

    Explanation:

    A function is a block of ordered, portable code used to perform a single, connected operation. The syntax of function declaration can be given as:

    Syntax:

    returntype functionName (parameter1, parameter2); / /function prototype

    or declaration

    returntype functionName (parameter1, parameter2) / /function definition or header of the function

    {

    //function body.

    //function implementation

    //return value;

    }

    In the given question the header of the showDub function is on line 15.

    That's why the answer to this question is "15 line".
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Which line in the following program contains the header for the showDub function? 1 #include 2 using namespace std; 3 4 void showDub (int); ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers