From 442a49ad5a48d417345959b903ae6a6d32d55759 Mon Sep 17 00:00:00 2001 From: Haidong Ji Date: Fri, 15 Apr 2022 15:51:30 -0500 Subject: Great C programming fun Excellent fundamentals and displine training, many tools and techniques exercises: gdb, emacs, valgrind, git --- 22_tests_power/next-README | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 22_tests_power/next-README (limited to '22_tests_power/next-README') diff --git a/22_tests_power/next-README b/22_tests_power/next-README new file mode 100644 index 0000000..60bc3f1 --- /dev/null +++ b/22_tests_power/next-README @@ -0,0 +1,18 @@ +Write a recursive function unsigned power(unsigned x, unsigned y) which computes x +to the y power. Note that while 0 to the 0 is undefined in mathematics, +we specify that 0 to the 0 shall be 1 for this function. + +Save it into a file called power.c + +You MUST use recursion (no iteration). + + +Use your test-power.c from your previous assignment to test your implementation +of power. You can symlink the file from the previous assignment into this directory: + +ln -s ../22_tests_power/test-power.c ./ + +You should then write a Makefile which will compile each C file separately +to an object file, and like them together. + + -- cgit v1.2.3