What do you mean by "write pointers in the function"? If intptr is a pointer-to-int, you can store an int at the address pointed to by writing *intptr = 43.