Problem Solving with C++ (10th Edition)
Problem Solving with C++ (10th Edition)
10th Edition
ISBN: 9780134448282
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
Question
Book Icon
Chapter 5.1, Problem 4STE
Program Plan Intro

void Functions:

  • A function must either return a single or no value at all.
  • A function that does not return a value is termed as “void” function.
  • The “void” function is been defined in same way as function that would return a value.
  • It implements only subtask for the complete problem.
  • If a “void” function is called, formal parameters are substituted with arguments.
  • The statements in function body are executed.
  • The “return” statement specifies the value that is been returned.

Blurred answer
Students have asked these similar questions
Write a definition for a void-function that has two int value parameters and outputs to the screen the product of these arguments. Write a main function that asks the user for these two numbers, reads them in, calls your function, then terminates. c++
Give an example from your own idea, of a program that use a void function (does not return avalue), based on your understanding. (You must include a main function)
Write the function prototype of the void function named G() that takes an int reference parameter and two char parameters respectively Your answer

Chapter 5 Solutions

Problem Solving with C++ (10th Edition)

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr