C Consider Following Code Value W First Call Function Chipmunk Void Chipmunk Int Int B Int Q37116140

C++

  1. Consider the following code. What is the value of w before thefirst call to the function Chipmunk?

    void Chipmunk(int a, int b, int& c);
    void Squirrel(int& a, int& b);
    int Feature(int b, int c);

    int main( )
    {
         int w = 1;
         int x = 2;
         int y = 3;
         int z = 4;

         Chipmunk(w, x, y);
         Squirrel(x, y);
         Chipmunk(z, y, x);
         z = Feature(x, w);
         return 0;
    }

    void Chipmunk(int a, int b, int& c)
    {
         a += 2;
         c = a + b;
    }

    void Squirrel(int& a, int& b)
    {
         int temp;
         temp = a;
         a = b;
         b = temp;
    }

    int Feature(int b, int c)
    {
         b = c;
         c

    OR
    OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.