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

Answers

Answer 1
Answer:

Answer:

Option 3 is the correct answer for the above question.

Explanation:

If any function is defined after the main function or any other function which is used to call that function then there needs a prototype defined before the calling function definition to tell the compiler that what type of that function is. for example, if a fun function is called by the main function and its definition is after the main function, then there needs to declare a function prototype before the main function definition.

The prototype syntax is "return_type function_name (argumen_type1, argument_type2)". This syntax is matched from option 3. Hence 3 is the correct answer for the above question while the other is not because:-

  • Option 1 states about the header file.
  • Option 2 states about the namespace name.
  • Option 4 states the main function.
  • Option 5 states about the curly braces.
  • Option 6, 7 and 8 states about the main function statement.
  • Option 9 states the return statement.
  • Option 10 states about the curly braces.
  • Option 11, 12, 13 and 14 states about the definition of showdub function.


Related Questions

7. Janie is taking an exam in her history class. On the exam, there is a question that asks her to state and discuss the five major causes of the Trans-Caspian War (whatever that was!). Janie remembers four of them. She knows there is a fifth, but time is up. As Janie is walking down the stairs, all of a sudden, she remembers the fifth point, but it is too late. Janie had a problem with ________. a) encoding b) storage c) retrieval d) evaluation
Which of the following would NOT be considered a cause of technological progress?A. scientific research B. innovation C. patents D. large markets
what is not a feature of the oracle autonomous databse to protect data from external and internal threats? a. data encryption b. admin passwords are disabled
In Excel you insert a comment in a worksheet by using the ____ tab on the Ribbon.
The * key is used for _____.

A personal computer uses a number of chips mounted on a circuit board calleda. microprocessor
b. system board
c. daughter board
d. mother board

Answers

The answer is d.mother board 

Which asynchronous electronic community is also known as a forum?

Answers

Yes. Or also known as a message board.

Web pages are accessed through a software program called a _____.

Answers

Answer:

a browser

Explanation:

browsers are used to gather information from other parts of the internet so that you can access it from other devices instead of just a computer

A ____ error occurs when an instruction does not follow the grammar of the programming language

Answers

A Syntax error occurs when an instruction does not follow the grammar of the programming language

The term firmware refers to programs embedded into hardware devices. This software only changes when a firmware upgrade is performed.A. TrueB. False

Answers

Answer:

True

Explanation:

Firmware are software programs embedded in hardware devices such as hard drives and BIOS, that allow these hardware devices to run properly. With the help of firmware, user programs can run on devices. Firmware programs hardly change throughout their lifetime except and upgrade is performed on them. Firmware are usually upgraded to fix bugs and maybe to add new features to them.

Examples of firmware are;

(i) programs written for a printer

(ii) software controlling the time in a washing machine.

Examples of three different types of computer storage

Answers

Hard disk, SD, USB. I think. Unless the question wants file storage methods.