The line calling inc1() will print '6' (3+3) [first 3 is from the inc1(), due to post increment operator the incremented value is not returned]. Also since the inc1() called by value, value of 'a' is not affected outside the function.
Now, if the statement of calling inc2() in the paper is as following:
printf("%d\n", inc2(a) + a);
then your code will compile (hoping that you will store a memory location in 'a') but depending on the value in it (in case 'a = 3') at runtime you will get Segmentation Fault, since you are trying to dereference the memory location 3 which is not supposed to be accessed by your program.
Alternatively, if the statement is as following:
printf("%d\n", inc2(&a) + a);
then inc2() will increment the value of 'a' through pointer (address) but will return old value of 'a' (3) still due to its using post increment operator, but it will increment 'a' anyway and any subsequent access to 'a' will get the new value. The next 'a' will have value '4' because of evaluation is done from left to right, hence it will print 7 (3+4).
I hope it clarifies the difference between pointer and variable in C.
inc2(&a)on the last line ofmain?atoinc2()will seg fault.