Question: What value is stored in ans after this code is executed? #define A _ TEST 3 #define B _ TEST 2 int cool _ function

What value is stored in "ans" after this code is executed?
#define A_TEST 3
#define B_TEST 2
int cool_function(int input_a)
{
static int q = A_TEST; // note: this is a static variable
q = q * A_TEST * input_a;
return B_TEST - q;
}
void main()
{
int ans = cool_function(cool_function(1));
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!