Thread: Help with a program involving two variables and two arrays

  1. #1
    Registered User
    Join Date
    Sep 2012

    Help with a program involving two variables and two arrays

    Hey guys, I'm new to C programming and I honestly have no clue how to complete this program for an assignment I've been given.

    I'm trying to write a program that is able to perform multiplication and division of two variables in two different arrays. This should be done through two ways:

    Pass the variables to the function and return the value via the return command to a variable in main.

    b. Pass a pointer to the address of the variables in the array to the function and have the function perform the multiplication and division in the array without returning anything

  2. #2
    TEIAM - problem solved
    Join Date
    Apr 2012
    Melbourne Australia
    There is a homework policy on this forum that states that no one can give you code, but help you with your own.

    Passing variables through functions is very fundamental to programming -> If you are trying to get "the edge" for the coarse you are doing, can I suggest that you look at C Tutorial - Learn C - in particular "Functions in C"

    For your algorithm in 'b', get a pen, paper and calculator and see if you can figure out the exact steps your take when multiplying/dividing
    Fact - Beethoven wrote his first symphony in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 07-09-2012, 08:18 AM
  2. Program Involving Binary Numbers
    By Abhishek Sp in forum C Programming
    Replies: 3
    Last Post: 04-20-2012, 11:11 AM
  3. Replies: 1
    Last Post: 11-23-2011, 01:01 PM
  4. Help with poker program(involving structs) C
    By lilbo4231 in forum C Programming
    Replies: 1
    Last Post: 04-25-2011, 11:43 PM
  5. Replies: 2
    Last Post: 03-13-2003, 09:40 AM