Consider the function `void modify_ptr(int *ptr) { ptr = malloc(sizeof(int)); }`. If…

Written by

in

Consider the function `void modify_ptr(int *ptr) { ptr = malloc(sizeof(int)); }`. If called as `modify_ptr(&x)`, what happens to `x` after the function call?

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

More posts