pass by address example in c:
What is the output of below c program?
int function(int *x)
compile time error
Output is 10,10. because the expression *x++, will increment the x to point to next address and fetching the value located in the next address. This expression is not incrementing the value located in the current x address. This is happening because ++ has higher priority compared to *.
Back To Top