I want you to have this examples though .Try to figure out what will happen(what will the output be) before running your code,in order to test yourself
Test 1
Code:
#include<stdio.h>
int main(void) {
int i = 3;
i++;
printf("i= %d\n", i);
++i;
printf("i= %d\n", i);
printf("i= %d\n", ++i);
printf("i= %d\n", i++);
printf("i= %d\n", i);
return 0;
}
Test 2
Code:
#include<stdio.h>
void print(int var);
int main(void) {
int i = 3;
print(i);
print(i++);
print(i);
print(++i);
print(i);
return 0;
}
void print(int var)
{
printf("i= %d\n",var);
}
If needed post back