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
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

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.

C++ Operators

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