473,394 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 3902
9,208 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
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
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
9,208 Expert Mod 8TB
Try reading this article. It may help.

Mar 17 '08 #8

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

Similar topics

by: Nathan Pinno | last post by:
Hi all, I need help figuring out how to fix my code. I'm using Python 2.2.3, and it keeps telling me invalid syntax in the if name == "Nathan" line. Here is the code if you need it. #This...
by: Marcin Borkowski | last post by:
Hello I need some small help in the Borland C++ Builder. I need to do something with string in format like "var1|var2|var3|var4|" and add it to some ComboBox (Items -> Add("var1"), Items ->...
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
by: Bob.Henkel | last post by:
I write this to tell you why we won't use postgresql even though we wish we could at a large company. Don't get me wrong I love postgresql in many ways and for many reasons , but fact is fact. If...
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
by: skumar434 | last post by:
i need to store the data from a data base in to structure .............the problem is like this ....suppose there is a data base which stores the sequence no and item type etc ...but i need only...
by: CM | last post by:
Hi, Could anyone please help me? I am completing my Master's Degree and need to reproduce a Webpage in Word. Aspects of the page are lost and some of the text goes. I would really appreciate it....
by: Y2J | last post by:
I am working through this book on C++ programming, the author is speaking of using linked lists. He gave and example which I found confusing to say the least. So I rewrote the example in a way that...
by: georges the man | last post by:
hey guys, i ve been posting for the last week trying to understand some stuff about c and reading but unfortunaly i couldnt do this. i have to write the following code. this will be the last...
by: U S Contractors Offering Service A Non-profit | last post by:
Brilliant technology helping those most in need Inbox Reply U S Contractors Offering Service A Non-profit show details 10:37 pm (1 hour ago) Brilliant technology helping those most in need ...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.