Ask Question
9 November, 02:54

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

+5
Answers (1)
  1. 9 November, 03:00
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers