October 21, 2024
Chicago 12, Melborne City, USA
C#

Is it possible to access a parameter of a function from another function in C?


Is it possible to access the value of a variable from a function within another function. You can assume that the first function is called in the main one.
Here is an example:

int foo (int x) {
    int z;
    // Do things...
    return 0;
}

int bar () {
    // Access value of z here.
    // Do more things...
    return 0;
}



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video