Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with this please Write a program of your choice which will use post-

ID: 3769732 • Letter: I

Question

I need help with this please

Write a program of your choice which will use post-fix versus pre-fix operators (example: a++ versus ++a). Use your textbook and/or online resources to read about these concepts and then try them out.  Write in your program's comments how they are different and generate different results in your code. Explain which would be better to use in our programs and why.

For additional function practice, you will need to use at least 3 functions in this program. The functions can be anything you choose, but at least 2 of them must return something to main.

Explanation / Answer

#include<iostream.h>
#include<conio.h>
int post(int a)
{  
   return a++;
}

int pre(int a)
{
   return ++a;
}

void main()
{
   int a=10,a1,a2;
   a1=post(a);
   cout<<a1<<endl;

   a2=pre(a);
   cout<<a2;

   getch();
}