printf("%d", &i)+1;
This prints the address of "i" but using "%d" causes the address to be printed in signed format which can give negative value. Also, this assumes integer size and pointer size are the same which might not be true. For address "%p" must be used. Anyway there is no error here as printf function returns integer (the no. of characters successfully printed) and this returned value is added with 1. In C language there is no restriction that a value must always be assigned or used. Simply writing
123;
is also valid in C.
scanf("%d", i)-1;
Like printf, scanf also returns an int. But it returns the no. of items successfully read. So, here also there is no syntax error. But scanf moves the read data to the memory location given to it as argument(s). Here, i is used as a memory location which most likely won't be valid. Hence, this causes runtime error- segmentation fault in Linux.