#include /** * Pass by Reference * Finally * @author gtowell * Created: March 2021 * **/ /** * Change the value of the pointer inside a function * === pass by reference * @param gip a pointer to an int * **/ void t(int *gip) { printf("TT1%5d%12d\n", *gip, gip); *gip = 7; printf("TT1%5d%12d\n", *gip, gip); } int main(int argc, char const *argv[]) { int giv = 3; printf("TM1%5d%12d\n", giv, &giv); t(&giv); printf("TM2%5d%12d\n", giv, &giv); return 0; }