From 8ec5431354bdb582455e8c32758098c5a0fdada2 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 26 Jul 2019 23:17:36 +0200 Subject: exam final --- exam_final/subjects/13-0-infin_add/subject.en.txt | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 exam_final/subjects/13-0-infin_add/subject.en.txt (limited to 'exam_final/subjects/13-0-infin_add/subject.en.txt') diff --git a/exam_final/subjects/13-0-infin_add/subject.en.txt b/exam_final/subjects/13-0-infin_add/subject.en.txt new file mode 100644 index 0000000..a531aa1 --- /dev/null +++ b/exam_final/subjects/13-0-infin_add/subject.en.txt @@ -0,0 +1,24 @@ +Assignment name : infin_add +Expected files : *.c, *.h +Allowed functions: write, malloc, free +-------------------------------------------------------------------------------- + +Write a program that takes as a parameter two strings that represent two +numbers potentially infinit, and displays on stdout the result of the addition +of these two numbers, followed by a '\n'. + +A negative number will always be prefixed by one and only one -. The only +characters that can be part of the strings are digits and the sign -. + +Both parameters will always be well formated, and you will always have +exactly two parameters, no tricks. + +Example: + +$> ./infin_add "879879087" "67548976597" | cat -e +68428855684$ +$> ./infin_add "-876435" "987143265" | cat -e +986266830$ +$> ./infin_add "-807965" "-34532" +-842497 +$> -- cgit