Write the definition of a function printDottedLine, which has no parameters and doesn't return anything. The function prints to standard output a single line (terminated by a new line character) consisting of 5 periods.

Respuesta :

Answer:

The answer to this question can be given as:

Function definition:

void printDottedLine()   //define function printDottedLine().

{

//function body.

cout << ".....\n";   //message

}

Explanation:

In above c++ programming language we define a function definition that can be explained as follows:

  • Firstly we define a function that is printDottedLine() function.
  • This function does not return any value because its return type is void.
  • The cout function prints the output in a single line which is terminated by a new line character that  consisting of 5 periods i.e dot.
ACCESS MORE