Purchase Solution

C++ Programming (User Defined Functions)

Not what you're looking for?

Ask Custom Question

3. Consider the following statements:

double num1, num2, num3;
int int1, int2, int3;
int value;

num1 = 5.0; num2 = 6.0; num3 = 3.0;
int1 = 4; int2 = 7; int3 = 8;

and the function prototype:

double cube(double a, double b, double c);

Which of the following statements are valid? If they are invalid, explain why.

a. value = cube (num1, 15.0, num3);

b. cout << cube(num1, num3, mum2);

c. cout << cube(6.0, 8.0, 10.5);

d. cout << cube(num1, num3);

e. value = cube(num1, int2, num3);

f. value = cube(7, 8, 9);

g. value = cube(int1, int2, int3);

Attachments
Purchase this Solution

Solution Summary

The expert examines c++ programming for the user function.

Solution Preview

3. Consider the following statements:

double num1, num2, num3;
int int1, int2, int3;
int value;

num1 = 5.0; num2 = 6.0; num3 = 3.0;
int1 = 4; int2 = 7; int3 = 8;

and the function prototype:

double cube(double a, double b, double c);

Which of the following statements are valid? If they are invalid, explain why.

a. value = cube (num1, 15.0, ...

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.