/* Main program: Using the various functions */ int main (void) { square1(); /* Calling the square1 function */ square2(7); /* Calling the square2 function using 7 as actual parameter corresponding to the formal parameter i */ printf("The value of square3() is %d\n", square3()); /* Ysing the square3 function */ printf("The value of square4(5) is %d\n", square4(5)); /* Using the square4 function with 5 as actual parameter corresponding to i */ printf("The value of area(3,7) is %d\n", area(3,7)); /* Using the area function with 3, 7 as actual parameters corresponding to b, h respectively */ }
int main(int argc, char const *argv[]) { square1(); square2(7); printf("The value of square3() is %d\n", square3()); printf("The value of square4(5) is %d\n", square4(5)); printf("The value of area(3, 7) is %d\n", area(3, 7)); return 0; }
int main() { Rectangle square1( 1, 100, 100, 3, 4 ); printRectange( square1 ); Rectangle square2( 2, 50, 50, 0, 4 ); printRectange( square2 ); Rectangle square3( square1 ); printRectange( square3 ); square1 = square2; printRectange( square1 ); Rectangle* pFoo = Foo(); printRectange( *pFoo ); return 0; }