English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

This is some stuff I am working on for a practice assignment I have for the first week of my class, the syntax is done in C++, fyi.

3.Consider the function headings:

void funcOne(int alpha[], int size);
Int funcSum(int x, int y);
Void funcTwo(const int alpha[],int beta[]);

And the declarations

Int list[50];
Int Alist[60];
Int num;

Write C++ satments that do the following:

a.Call the function funcOne with the actual parameters, list and 50 respectively.
funcOne(alpha[],size,list[]);

b.Print the value returned by the function funcSum with the actual parameters, 50 and the fourth component of list, respectively.

Ok, now this is what I have a question on, the words on question b..."Print the value returned by the function funcSum", the last time I checked, you can return any value you want as long as it was the same data type AS the function, I could return 0,1,x,y, heck I could return 666 if I wanted, but that is beyond the question. Is it just me...or

2006-08-24 12:42:39 · 1 answers · asked by D 4 in Computers & Internet Programming & Design

or is not enough information proviced to answer this question, since the book does not TELL me the value that is supposed to be returned within the function.

2006-08-24 12:43:20 · update #1

1 answers

The question is poorly worded. Chances are, funcSum returns the sum of two values x and y. If you need an answer, x+y would be the best guess, but like you said, there is no real way of knowing.

2006-08-25 08:30:52 · answer #1 · answered by Techie 1 · 0 0

fedest.com, questions and answers