Code: void main() { int i=10,sum=0; sum = ++i + ++i + ++i; printf("sum = %d", sum); } void main() { int i =10,sum=0; sum= i++ + i++ + i++; printf("sum=%d",sum); }
Another thing, do not post this type of code, put codes within [CODE ] [/ CODE] and please post full codes with header files and getch(); also. While posting two codes within a post, please seperate them! thanks! nice question!
for this scenario the operations of prefix and postfix are not clear but for someother cases results can be different