You have declared the pointer variables ptr_i and ptr_f but have never assigned an address to either of them. As they are local variables their contents will be indeterminate. They may contain any value, and therefore attempting to dereference them will be meaningless and may try to access invalid or inaccessible memory locations.
As your earlier code examples in other threads correctly assign usable addresses to these pointer variables before trying to use them, you already know how to do that.
ptr_i = &i;
ptr_f = &f;
- Wayne