468,512 Members | 1,361 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

C++ I need help please

C++ Programming From Problem analysis to program design Third Edition D.S. Malik

Consider the following function main:

int main ()
{

int inStock[10] [4] ;
int alpha[20] ;
int beta[20] ;
int gamma[4] = {11, 13, 15, 17} ;
int delta[10] = {3, 5, 2, 6, 10, 9, 7, 11, 1, 8} ;

.
.
.

a. Write the definition of the function setZero that initializes any one-dimensional array of type int to 0.
b. Write the definition of the function inputArray that prompts the user to input 20 numbers and stores the numbers into alpha.
c. Write the definition of the function double Array that initializes the elements of beta tow two times the corresponding elements in alpha. Make sure that you prevent the function from modifying the elements of alpha.
d-i pg. 545

the list goes on from their but I need help. I am so lost with this programming assignment need help
Mar 16 '08 #1
7 3494
weaknessforcats
9,207 Expert Mod 8TB
Please read the posting guidelines.


I can help with specific programming and design issues but I cannot provide complete solutions or act as a tutor.
Mar 16 '08 #2
I really don't have any idea how to started off with this problem
Mar 16 '08 #3
Then you have come to the wrong place for help.

Open your textbook and refer to the section which deals with arrays. Make sure you go back to the beginning of arrays when they are first introduced. Then read slowly, and make sure you understand every detail as you come to it.

If there is a specific detail you come across which confuses you, then feel free to post here about that and I'm sure many of us would be glad to help.
Mar 16 '08 #4
I am lost very lost with everything that I support to do doing
Mar 16 '08 #5
sicarie
4,677 Expert Mod 4TB
a. Write the definition of the function setZero that initializes any one-dimensional array of type int to 0.
Are you familiar with functions and return values?

Are you familiar with creating and initializing arrays?
Mar 17 '08 #6
rdsandy
20
CWilliam912, if its a programming assignment, you will have a tutor of some sort (whether at work, university etc) who gave you this problem and will therefore know the answer. Why not ask him/her first, not for the answer but for advice? Also a C++ book will help you greatly aswell.
Mar 17 '08 #7
weaknessforcats
9,207 Expert Mod 8TB
Try reading this article. It may help.

http://www.thescripts.com/forum/thread772412.html.
Mar 17 '08 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Nathan Pinno | last post: by
17 posts views Thread by Marcin Borkowski | last post: by
6 posts views Thread by mike | last post: by
8 posts views Thread by skumar434 | last post: by
reply views Thread by U S Contractors Offering Service A Non-profit | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.