58.9k views
5 votes
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.———

User Sturm
by
7.2k points

1 Answer

3 votes

Answer:

The function definition to this question can be given as:

Function definition:

void printDottedLine() //define method.

{

//method body

printf(".....\\");

//print periods.

}

Explanation:

The description of the above function definition can be given as:

  • In the above code, we define a method that name is "printDottedLine". This method does not return any value because we use the void return type in this function.
  • In this function, we print the five periods(.) and terminate by new line character(\\). This code will give five periods that is ".....".
User PilgrimViis
by
7.8k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.