Question: // This is the error message i get when i compile the code I need help, I am almost done with this assignment, however, i

 // This is the error message i get when i compile

the code I need help, I am almost done with this assignment,

however, i still get errors when i compiled in GCC. The expected

// This is the error message i get when i compile the code

output and specifications are posted above. I need help :( // Code

I need help, I am almost done with this assignment, however, i still get errors when i compiled in GCC. The expected output and specifications are posted above. I need help :(

// Code I have worked on

#include

#define addm(A, B) (A + B)

#define cubem(x) (x*x*x)

#define minm(a, b) (((a)

#define evenm(n) ((n%2 == 0) ? 1 : 0)

int subf(int a, int b)

{

return a - b;

}

int cubef(int a)

{

return a * a * a;

}

int minf(int a, int b)

{

if (a

{

return a;

}

else

{

return b;

}

}

int oddf(int a)

{

if(a % 2 == 1)

{

return 1;

}

else

{

return 0;

}

}

int main()

{

int a = 3, b = 6;

subf(a, b);

printf("subf(a, b) = %d " , subf(a, b));

subm(a, b);

printf("subm(a, b) = %d " , subm(a, b));

subf(a++, b--);

printf("subf(a++, b--) = %d " , subf(a++, b--));

a = 6, b = 8;

subm(a++, b--);

printf("subm(a++, b--) = %d " , subm(a++, b--));

a = 6, b = 8;

cubef(a);

printf("cubef(a) = %d " , cubef(a));

cubem(a);

printf("cubem(a) = %d " , cubem(a));

cubef(--a);

printf("cubef(--a) = %d " , cubef(--a));

a = 3, b = 6;

cubem(--a);

printf("cubem(--a) = %d " , cubem(--a));

a = 3, b = 6;

minf(a, b);

printf("minf(a, b) = %d " , minf(a, b));

minm(a, b);

printf("minm(a, b) = %d " , minm(a, b));

minf(--a, --b);

printf("minf(--a, --b) = %d " , minf(--a, --b));

a = 3, b = 6;

minm(--a, --b);

printf("minm(--a, --b) = %d " , minm(--a, --b));

a = 2, b = 6;

oddf(a);

printf("oddf(a) = %d " , oddf(a));

oddm(a);

printf("oddm(a) = %d " , oddm(a));

a = 6, b = 8;

oddm(a++);

printf("oddm(a++) = %d " , oddm(a++));

return 0;

}

int subf(int a, int b) { return a - b; int cubef(int a) { return a * a * a; int minf(int a, int b) { if (a

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!