/* * @topic T00352 May 2 -- pointers passed to functions * @brief Program demonstrates using pointers as function parameters */ #include <iostream> using namespace std; void square_double( double addr[] ) { addr[ 0 ] = addr[ 0 ] * addr[ 0 ]; } void square_double( double* addr ) { (*addr) = (*addr) * (*addr); } int main() { double value = 4.55; square_double( &value ); return 0; }