Search:

Type: Posts; User: kcrossley

Search: Search took 0.00 seconds.

  1. Replies
    1
    Views
    2,705

    Swapping Addresses by Reference

    Hello:

    I understand C may only change an address via function. However I cannot seem to make that happen. Specific to the code below..."Why doesn't the function SwapAdd modify the addresses in...
  2. That's it! You're awesome Matticus! Thank you...

    That's it! You're awesome Matticus!
    Thank you for your input...much appreciated. The following works perfectly...



    int add_nums (int x, int y)
    {
    int sum;
    sum = x + y;
    return sum;
  3. Thank you Matticus! I resorted to using...

    Thank you Matticus!

    I resorted to using variables a and b to get past CFree's "declaration of 'x' shadows a parameter" warning.

    Though the function add_nums has been modified, the result is...
  4. Function Addiding Two Integers Returns Incorrect Result

    Hello Everyone:

    I am new to functions. I would like to add two numbers input by the user. Though the math output generated in the main function works fine, "add_nums" outputs a ten digit value...
Results 1 to 4 of 4