Arrays

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • selam
    New Member
    • Nov 2006
    • 16

    #1

    Arrays

    I have this assignment using c++ please help me in writing a code.
    Suppose you have a main ( ) with three local arrays, all the same size and type (say float). The first two are already initialized to values. Write a function called add arrays ( ) that accepts the addresses of the three arrays as arguments; add the contents of the first two arrays together, element by element; and places the results in the third arrays before returning. A forth argument to this function can carry the size the size of the array. Use pointer notation through out; the only place you need brackets is in defining the arrays.
  • kvbreddy
    New Member
    • Feb 2007
    • 23

    #2
    Can u post the code what ever u have tried???

    Originally posted by selam
    I have this assignment using c++ please help me in writing a code.
    Suppose you have a main ( ) with three local arrays, all the same size and type (say float). The first two are already initialized to values. Write a function called add arrays ( ) that accepts the addresses of the three arrays as arguments; add the contents of the first two arrays together, element by element; and places the results in the third arrays before returning. A forth argument to this function can carry the size the size of the array. Use pointer notation through out; the only place you need brackets is in defining the arrays.

    Comment

    • selam
      New Member
      • Nov 2006
      • 16

      #3
      Originally posted by kvbreddy
      Can u post the code what ever u have tried???
      I don't have any code

      Comment

      • rajesh6695
        New Member
        • Oct 2006
        • 96

        #4
        First Try to write a code if you have any problem in the code then we will solve for you.....

        No one will do the work for you but we will guide you...

        Comment

        • sicarie
          Recognized Expert Specialist
          • Nov 2006
          • 4677

          #5
          Originally posted by selam
          I don't have any code
          Rajesh6695 is right - we cannot and will not do your work for you. Please read the posting guidlines more carefully.

          The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve. This question will now be closed and you will have to post a new question when you're ready.

          MODERATOR

          Comment

          Working...