Search Results

Search found 1 results on 1 pages for 'supertecnoboff'.

Page 1/1 | 1 

  • Pass, edit and return variable in C

    - by Supertecnoboff
    I am new to C programming and recently I have been playing around with functions in C programming. But I have a simple problem: Basically I want to pass an integer to a function, have the function edit it and then pass back the integer to the main function. I am working on this but it isn't working..... Here is my code: int update_SEG_values(int DIGIT_1, int DIGIT_2) { // How many tens in the "TEMP_COUNT". DIGIT_2 = ((TEMP_COUNT) / 10); // How much is left for us to display. TEMP_COUNT = TEMP_COUNT - ((DIGIT_2) * 10); // How many ones. DIGIT_1 = ((TEMP_COUNT) / 1); return(DIGIT_1, DIGIT_2); } What am I doing wrong here?

    Read the article

1